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 前
已解决
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 前
已解决
Y=X
Given an input variable x, output a variable y that is equal in value to x.
Example:
Input x = 1
Output y is 1
Inp...
Max of a Vector
Write a function to return the max of a vector
10 years 前
已解决
Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the hourly wage times 40 and times 50, because annualSalary = hour...
10 years 前
已解决
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 前
已解决
Squaring Matrix
Square the following matrix using matlab
%
A = 1 2 3 4
5 6 7 8
So new matrix should display...
Reverse a matrix
Its simple. You have to reverse a given matrix.
10 years 前
已解决
Write an expression
Assigns finalResult with firstSample plus secondSample, squared, then divided by 3. Ex: If firstSample is 18 and secondSample is...
10 years 前
已解决
Plus x: A first program
_Solve this problem in Mathwork's online Cody system._
Write a statement that assigns y with 5 plus x.
Ex: If input x = 2,...
10 years 前
已解决
Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.
10 years 前
已解决
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 ...
Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody.
Return the largest positive floating-point number MATLAB can han...