Solved


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

10 years ago

Solved


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

10 years ago

Solved


Array of Ones
Create a 100 X 100 array of ones.

10 years ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

10 years ago

Solved


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

10 years ago

Solved


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

10 years ago

Solved


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

10 years ago

Solved


convert matrix to single column
given any matrix, convert it to single column

10 years ago

Solved


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

10 years ago

Solved


Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

10 years ago

Solved


find radius of cone
if Slant height of Cone(I)& hight of Cone(H) given then find radius of the Cone(R) for example I=5,h=4 then the ans R=3;

10 years ago

Solved


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

10 years ago

Solved


Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

10 years ago

Solved


Max of a Vector
Write a function to return the max of a vector

10 years ago

Solved


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

10 years ago

Solved


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

10 years ago

Solved


Find the dimensions of a matrix
Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

10 years ago

Solved


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

10 years ago

Solved


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

10 years ago

Solved


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

10 years ago

Solved


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

10 years ago

Solved


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

10 years ago

Solved


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

10 years ago

Solved


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

10 years ago

Solved


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

10 years ago

Solved


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

10 years ago

Solved


length of a vector
Find twice the length of a given vector.

10 years ago

Solved


kmph to mps
convert kilometer per hour to meter per second

10 years ago

Solved


Min of a Matrix
Return the minimum value in the given matrix.

10 years ago

Solved


Sum the numbers on the main diagonal
Sum the numbers on the main diagonal of an n-by-n matrix. For input: A = [1 2 4 3 6 2 2 4 7]...

10 years ago

Load more