A résolu


Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer: e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2

plus de 7 ans il y a

A résolu


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

plus de 7 ans il y a

A résolu


Positive Infinity
Round the array a towards positive infinity

plus de 7 ans il y a

A résolu


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

plus de 7 ans il y a

A résolu


Matlab Basics - Sum a vector
Write a script to add up all the elements in a vector e.g. x = [1 2 3 4] --> output = 10

plus de 7 ans il y a

A résolu


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

plus de 7 ans il y a

A résolu


Reverse a matrix
Its simple. You have to reverse a given matrix.

plus de 7 ans il y a

A résolu


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

plus de 7 ans il y a

A résolu


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

plus de 7 ans il y a

A résolu


Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

plus de 7 ans il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

plus de 7 ans il y a

A résolu


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

plus de 7 ans il y a

A résolu


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

plus de 7 ans il y a

A résolu


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

plus de 7 ans il y a

A résolu


Rotate a Matrix by 90 degrees
Rotate a Matrix by 90 degrees Example: If the input is: X = 1 2 3 4 5 6 7 8 9 ...

plus de 7 ans il y a

A résolu


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

plus de 7 ans il y a

A résolu


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

plus de 7 ans il y a

A résolu


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

plus de 7 ans il y a

A résolu


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

plus de 7 ans il y a

A résolu


surface of a spherical planet
you just discovered its circumference, that is the input.

plus de 7 ans il y a

A résolu


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

plus de 7 ans il y a

A résolu


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

plus de 7 ans il y a

A résolu


Matlab Basics II - Free Fall
An object freely falling from rest under gravity covers a distance x given by: x = 1/2 gt^2 write a function that calculat...

plus de 7 ans il y a

A résolu


Matlab Basics II - Intervals
Write a function that takes an interval from a to b, and divides it into 5 parts example: a = 1, b = 2 output = 1 1.25 ...

plus de 7 ans il y a

A résolu


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

plus de 7 ans il y a

A résolu


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

plus de 7 ans il y a

A résolu


Matlab Basics II - Minimum
Write a function that returns the minimum of each ROW of a matrix x example: x = [1 2 3; 4 5 6]; output [1;4];

plus de 7 ans il y a

A résolu


Product of Array
Given an array of numbers. Get the product of the array.

plus de 7 ans il y a

A résolu


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

plus de 7 ans il y a

A résolu


Solve Linear equations
Solve Linear equations Example: x+y=2 and x+2y=3, then x and y equal to 1.

plus de 7 ans il y a

Charger plus