only input
Return the output without writing any code into the function.
約9年 前
解決済み
Min of a Matrix
Return the minimum value in the given matrix.
約9年 前
解決済み
Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.
約9年 前
解決済み
Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN.
Example:
input: x = [1 2 5 12 10 7]
...
Add two numbers
Calculate the sum of two numbers.
Example
input = [2 3]
output = 5
約9年 前
解決済み
Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x.
<<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...
Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle.
<<http://upload...
Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...
約9年 前
解決済み
Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1.
Example...
約9年 前
解決済み
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...