Shift elements of vector left
Shift elements of vector to the left.
For ex. : Input_vec = [1 2 3 4 5]
Output_vec = [2 3 4 5 1]
6ヶ月 前
解決済み
Average of even-numbered columns
Given a vector, find the average of even-numbered columns.
e.g
x = [ 4 6 8 9 1 2 7 ]
y = ( 6 + 9 + 2 ) / 3
6ヶ月 前
解決済み
Step up
For given input array, output a array with all elements step up by two
6ヶ月 前
解決済み
What percentage?
Calculate the output c as the percentage of a on b for given a and b.
6ヶ月 前
解決済み
Array Concatenation (1)
Given two matrices, a and b, concatenate the two matrices horizontally, i.e., the number of columns of the result should be equa...
Check if sorted
Check if sorted.
Example:
Input x = [1 2 0]
Output y is 0
6ヶ月 前
解決済み
Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...
6ヶ月 前
解決済み
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...
6ヶ月 前
解決済み
Roll the Dice!
Description
Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice.
Example
[x1,x2] = rollDice(...
Solve expression II
Solve given expression.
alpha=0.1(-x-y-50)/(exp((-x-y-50)/10)-1)
beta=5exp((-x+y-60)/20)
result=alpha+beta;
6ヶ月 前
解決済み
Simple Interest : Calculate time in years
Theorem : Simple Interest
where;
F : Future Value
P : Present Value
r : Annual simple interest rate (decimal)
t : Time in...