A résolu


Find the sides of an isosceles triangle when given its area and height to its base.
Find the sides of an isosceles triangle when given its area and height to its base. Example S=12, h=4, result will be [5 5 6]...

plus de 9 ans il y a

A résolu


Reverse digits of a number
Reverse digits of a number. For example, return *321* for the input *123* . The left-hand zeros can be discarded. For exam...

plus de 9 ans il y a

A résolu


Solve the system of equations.
_Ax=b_ * _A_ - square coefficient matrix * _b_ - right side column vector Find vecor _x_.

plus de 9 ans il y a

A résolu


All odd - all even
All odd numbers in x are added, while all even numers are subtracted from this. example: x = [1 2 3 4 5]; y = +(1+3+5)-...

plus de 9 ans il y a

A résolu


Get derivarive of polynomial given as vector array.
Get derivarive of polynomial given as vector array. Example p=[ 1 2 0 5 0 3 ]; result=[ 5 8 0 10 ...

plus de 9 ans il y a

A résolu


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

plus de 9 ans il y a

A résolu


For given vectors x,y find coresponding spline coefficients.
For given vectors x,y find coresponding spline coefficients. Example x =[ -3 -2 0 2 3] y =[ 0 0 1 ...

plus de 9 ans il y a

A résolu


Counting candies
In a classroom of |'n'| children, every even numbered child gets one big candy and every odd numbered child gets two small candi...

plus de 9 ans il y a

A résolu


Counting votes
x is a vector of votes, e.g. x=[1 2 3 2 2 1 3 2 1 2 2 2 2], who is the winner? 1,2,3?

plus de 9 ans il y a

A résolu


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

plus de 9 ans il y a

A résolu


Find Adjacency Matrix
Graph is undirected. (s,t) in node pairs. Please, return full storage version of the matrix.(use _full(A)_ ) Input: s...

plus de 9 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.

plus de 9 ans il y a

A résolu


Number of nonzero elements in matrix
Calculate the number of nonzero elements for given matrix

plus de 9 ans il y a

A résolu


Chicken Race
2 chickens, Pete and Fred, compete in a 100 meter race. Pete runs at a velocity of vp meter/second and Fred is slower, running ...

plus de 9 ans il y a

A résolu


Integrate Me
Given polynomial, output the integral (with k = 1 for simplicity purposes) Example: input = [2 1] % 2x+1 output = [1 1 1]...

plus de 9 ans il y a

A résolu


Modified Upper Matrix Mock
Given a vector v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 0 3 6 9 11; 0 0 6 9 11; 0 0 0 9 11; 0 0 0...

plus de 9 ans il y a

A résolu


Number of elements in matrix
Calculate the # of elements for given matrix

plus de 9 ans il y a

A résolu


Convert array of decimal numbers into binary numbers array.
Convert array of decimal numbers into binary numbers array. Example x = [1 2 3 4 5 6 7 8 ]; re...

plus de 9 ans il y a

A résolu


Find matrix of indices for multidimensional matrix.
Given some multidimensional matrix A. Get a matrix of the same size as A where all elements are replaced by their index along th...

plus de 9 ans il y a

A résolu


How do you make seven even?
Take away the s.

plus de 9 ans il y a

A résolu


What do you get if you multiply six by nine?
The Hitchhiker's Guide to the Galaxy based task. Tip: n-base numeral system

plus de 9 ans il y a

A résolu


Replace 0 to NaN!
In given matrix A=[1 nan nan; 2 2 nan; nan nan 1]; replace NaN to 0. Use matrix A as a input.

plus de 9 ans il y a

A résolu


Calculate the centroid of a triangle
Info: https://en.wikipedia.org/wiki/Centroid Example Input: x = [0 0 1]; % x-coordinate y = [0 1 0]; % y-coordinat...

plus de 9 ans il y a

A résolu


Convert array of decimal numbers into hexadecimal numbers array.
Convert array of decimal numbers into hexadecimal numbers array. Example x =[ 32 33 34 35 36 37 38 ...

plus de 9 ans il y a

A résolu


Calculate solution of given polynomial
For example, y=function([3 -2 -4]) In here, input vector indicate 3*x^2-2*x-4, y is solution of former equation. y=[1.5...

plus de 9 ans il y a

A résolu


Find the sum of the negative elements under the main diagonal.
Example Input A=[1 2; -3 0] Output -3

plus de 9 ans il y a

A résolu


Find product of eigenvalues of n*n magic matrix.
Find product of eigenvalues of n*n magic matrix. Example n=3 Matrix= [ 8 1 6; 3 5 7; 4 ...

plus de 9 ans il y a

A résolu


Calculate this one!
Using matlab calculate y y=(e^2)+100/20+sin(pi)*x Use x as a input.

plus de 9 ans il y a

A résolu


Set number x for diagonal of square matrix, which size is n.
Set number x for diagonal of square matrix, other values should be equlal 0, which size is n. Example n=2, x=4: [4 0; 0 4]

plus de 9 ans il y a

A résolu


Calculate gradient
x=1:0.1:5; y=@(x)x^2; calculate gradient (dy/dx) using numerical method. This means dydx(i)=(y(i+1)-y(i))/(x(i+1)-x...

plus de 9 ans il y a

Charger plus