A résolu


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

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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...

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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 ...

plus de 6 ans il y a

A résolu


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

plus de 6 ans il y a

A résolu


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 ...

presque 7 ans il y a

A résolu


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

presque 7 ans il y a

A résolu


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

presque 7 ans il y a

A résolu


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.

presque 7 ans il y a

A résolu


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

presque 7 ans il y a

A résolu


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 ...

presque 7 ans il y a

A résolu


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...

presque 7 ans il y a

A résolu


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.

presque 7 ans il y a

A résolu


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

presque 7 ans il y a

A résolu


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

presque 7 ans il y a

A résolu


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

presque 7 ans il y a

A résolu


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

presque 7 ans il y a

A résolu


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

presque 7 ans il y a

A résolu


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

presque 7 ans il y a

A résolu


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...

presque 7 ans il y a

A résolu


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...

presque 7 ans il y a

A résolu


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...

presque 7 ans il y a

A résolu


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 ...

presque 7 ans il y a

A résolu


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...

presque 7 ans il y a

A résolu


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...

presque 7 ans il y a

A résolu


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

presque 7 ans il y a

A résolu


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.

presque 7 ans il y a

A résolu


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...

presque 7 ans il y a

A résolu


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...

presque 7 ans il y a

Charger plus