Solved


Calculate BMI
Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

6 years ago

Solved


Find the Best Hotels
Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

6 years ago

Solved


Rescale Scores
Each column (except last) of matrix |X| contains students' scores in a course assignment or a test. The last column has a weight...

6 years ago

Solved


Calculate the square root of a number
Input a Output b = srt(a)

6 years ago

Solved


Crop an Image
A grayscale image is represented as a matrix in MATLAB. Each matrix element represents a pixel in the image. The element values ...

6 years ago

Solved


Product of two multivariate polynomials
MATLAB <https://www.mathworks.com/help/matlab/polynomials.html has a few functions> for creating and manipulating single-variabl...

6 years ago

Solved


Rearrange the given matrix to have all its zeros climb up to the top of each column - using for loops.
Given a matrix x, *using loops only* return a matrix y, in which all the zeros have "climbed" up to the top. That is, any zeros ...

6 years ago

Solved


struct2values()
Convert a struct object into a column vector. You can assume that the struct elements are scalars Example: a = struct();...

6 years ago

Solved


Find 1's Complement
Find 1's complement of a binary number For Example: x = 10011010 1's complement of x = 01100101

6 years ago

Solved


Send vector into a struct object
Construct a struct object that contains n fields named a1, a2, ..., an, and has values from a given input vector of length n.

6 years ago

Solved


Approximate the cosine function
Without using MATLAB trigonometric functions, calculate the cosine of an argument |x| to a precision of |0.0001| *Hint:* You ...

6 years ago

Solved


Modified run-length companion vector
Given a vector x, return a vector that indicates the run length of any value in x. Each element in output vector shows how many ...

6 years ago

Solved


Clipper Function
Create a function that emulates a clipper circuit Given sin wave, t and the constant value for clipping, and the direction to re...

6 years ago

Solved


Determine the roots of a cubic equation
Given the coefficients a, b, c, and d of a cubic equation, a*x^3 + b*x^2 + c*x + d = 0, determine its roots.

6 years ago

Solved


Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

6 years ago

Solved


Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

6 years ago

Solved


Create cotangent function out of sine.
Please, don't use cos, tan, cot matlab functions.

6 years ago

Solved


Create tangent function out of sine function only
Please don't use cosine and tangent functions

6 years ago

Solved


Create tangent function out of sin and cos
Please don't use tan(x) directly

6 years ago

Solved


Create tangent function out of cosine only
Please don't use tangent and sine functions

6 years ago

Solved


Duration of a trip in minutes
Input is a string which includes the duration of a trip. Convert the duration to minutes. For example if the duration of a t...

6 years ago

Solved


Two dimensional moving average
A=[1 2 3 4 5 1 2 2 2 3 2 3 3 3 4 1 1 4 4 2] B=[1 1;1 1]; % This is can be used for weight factor of moving a...

6 years ago

Solved


Solve equation numerically
y'=y In order to solve equation using computer, numerical analysis are needed. 1st order Euler's method is one of the metho...

6 years ago

Solved


Remove the air bubbles from a vector
_*A reduced version of Problem 112*_ Given a column vector v, return a vector w in which all the zeros have "bubbled" to the ...

6 years ago

Solved


Block average ignoring NaN values
Given a matrix, calculate the block average of each disjoint sub-matrix while ignoring *NaN* values. Assume that the size of the...

6 years ago

Solved


Block average
Given a matrix, calculate the block average of each disjoint sub-matrix of the same size. Assume that the size of the matrix alo...

6 years ago

Solved


Magnet and Iron
(Inspired from <http://www.mathworks.com/matlabcentral/cody/problems/112 Problem 112: Remove the air bubbles>) Iron (atomic n...

6 years ago

Solved


Given n, create n random numbers such that their standard deviation is also n.
Given n, create n random numbers such that their standard deviation is also n.

6 years ago

Solved


Say type of roots in quadratic equation
Given the coefficients of a quadratic equation, write a function that gives the output y='RealDifferent' if the roots are real a...

6 years ago

Solved


Permutation Via Multiplication
Given two numbers a and b, determine if the product ab is a permutation of the digits of a. For example, this is always true for...

6 years ago

Load more