A résolu


Matlab Basics II - Unit Conversion
Write a function that converts Kg to lbs, returns the answer to the nearest 1/100th of a pound

plus d'un an 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 d'un an il y a

A résolu


Matlab Basics II - Log and natural log
Write a function that calculates the difference between the log and natural log of a vector, to two decimal places example: ...

plus d'un an il y a

A résolu


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

plus d'un an il y a

A résolu


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

plus d'un an 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 d'un an il y a

A résolu


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

plus d'un an 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 d'un an il y a

A résolu


Sort by absolute value
Given a list of numbers, arrange them in ascending order based on their absolute values. For example, for the list [-30, -5, 1...

plus d'un an 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 d'un an il y a

A résolu


Remove the Zero
Given an array n, remove all zeros

plus d'un an il y a

A résolu


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

plus d'un an il y a

A résolu


Vector Element Multiplication
Take two incoming vectors, and output the element wise multiplication of the vectors.

plus d'un an il y a

A résolu


Matrix Max Finder
Output the maximum value in a matrix

plus d'un an il y a

A résolu


Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)

plus d'un an il y a

A résolu


Replace 0 indices in array with 1's
Take a incoming vector, and replace 0's with ones

plus d'un an il y a

A résolu


Determine whether the input is odd, even, or neither.
Make a function that returns ‘odd’ if the input is odd, ‘even’ if the input if even or ‘error’ if the input is neither odd nor ...

plus d'un an il y a

A résolu


How to calculate the length of a triangle's side given two angles and one side
You are given a triangle with angles alpha, beta and gamma and sides a opposite alpha, b opposite beta and c opposite gamma. ...

plus d'un an il y a

A résolu


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

plus d'un an il y a

A résolu


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

plus d'un an il y a

A résolu


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

plus d'un an il y a

A résolu


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

plus d'un an 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 d'un an il y a

A résolu


vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

plus d'un an il y a

A résolu


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

plus d'un an il y a

A résolu


Find out total non zero element of matrix
Find out Non zero element of matrix A=magic(5) 17 24 1 8 15 23 5 7 14 16 4 6...

plus d'un an il y a

A résolu


Area of rhombus
Calculate the rhombus area

plus d'un an il y a

A résolu


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

plus d'un an 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 d'un an il y a

A résolu


CONVERT TAN TO SIN
In a right angle triangle ABC given the tan(A) then find sin(A) For example tan(A)=3/4 then sin(A)=3/5

plus d'un an il y a

Charger plus