Vector with a repeated entry
Create a row vector of length n, filled with 5's. For example, if n = 3,
output = [4 4 4]
Hint:
Search for the function...
9年以上 前
解決済み
Log of a number
Write a script that will give the log of x as output.
9年以上 前
解決済み
Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...
9年以上 前
解決済み
Divisible by 5
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...
9年以上 前
解決済み
Possible Outcomes of American Roulette
The payout for American roulette can be calculated by:
payout = (38/n)-1
where n is the number of squares the bet covers.
...
Area of a Circle
x=radius
%construct the area of a circle using x and pi
9年以上 前
解決済み
Magic!
Check whether the input matrix is a normal magic square:
<http://en.wikipedia.org/wiki/Magic_square>
Output the logical va...
9年以上 前
解決済み
Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...
9年以上 前
解決済み
UICBioE240 problem 1.7
Find the other two angles of a right triangle given the two of the sides.
So if A = [1 1]
B = [45 45]
UICBioE240 problem 1.9
Swap the first and last columns of a matrix.
So if A = [12 4 7;
5 1 4];
B = [7 4 12;
4 1 5];
...
9年以上 前
解決済み
UICBioE240 problem 1.8
Given a list of grades in a class, write a script that gives the 2nd highest grade in the class and the average for the class.
...