Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places:
e.g. x = 2.3456 --> y = 2.346
7 years 前
已解决
Counting down
Create a vector that counts from 450 to 200 in increments of 10.
7 years 前
已解决
Back to basics 15 - classes
Covering some basic topics I haven't seen elsewhere on Cody.
Return the class of the input variable.
7 years 前
已解决
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...
Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody.
Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...
Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.
7 years 前
已解决
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...
7 years 前
已解决
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...
7 years 前
已解决
Rounding
Round 10.67 and make 'y' equal to that number.
7 years 前
已解决
Reverse a matrix
Its simple. You have to reverse a given matrix.
Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.
7 years 前
已解决
Complex number
For complex number c=a+bi, write code that will add a and b together.
7 years 前
已解决
Negative matrix
Change the sign of all elements in given matrix.
7 years 前
已解决
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...
7 years 前
已解决
Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.
7 years 前
已解决
Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input vector of numbers, output a square array with the...