Max of a Vector
Write a function to return the max of a vector
3年弱 前
解決済み
Min of a Matrix
Return the minimum value in the given matrix.
3年弱 前
解決済み
Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z.
Examples:
Inputs x = 2, y = 4
Output z is 6
...
3年弱 前
解決済み
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...
Unique - Very Very Large Numbers
Given a vector column, with some very large numbers, create the ascending sort and unique vector.
*Input:* A (column vector)...
3年弱 前
解決済み
Compute the drag on a moving vehicle
We assume no rolling resistance, and the simple rule for Drag : , where is the density of the fluid (assumed at 1.2 ), is the ...
3年弱 前
解決済み
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]
3年弱 前
解決済み
Reverse a matrix
Its simple. You have to reverse a given matrix.
3年弱 前
解決済み
Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not.
Example:
1:7 -> 0
[7 5 2] -> 1
3年弱 前
解決済み
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 ...
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]
...
3年弱 前
解決済み
Harmonic series counting
The function takes a positive limit as input,
And counts how many terms must be summed in the harmonic series:
1/1, 1/2, 1/3, ...
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...