Add the positive numbers
Add only the positive numbers of x
example:
x = [-2 -1 0 1 2 3]
the positive numbers are: 1 2 3, so their sum is 6
4年弱 前
解決済み
Say type of roots in quadratic equation
Given the coefficients of a quadratic equation, write a function that gives the output y='RealDifferent' if the roots are real a...
4年弱 前
解決済み
Quadratic equation
given three inputs (a, b, c) for the equation a*x^2+b*x+c=0; return 1 if the roots are complex (non zero imaginary), and 0 if th...
Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n.
For example:
v=[1 2 3 4 5 6]
n=3
vNew =...
UICBioE240 problem 1.5
Find the size of the matrix, then multiply both values by 10 and make it into a column vector.
So if A = [ 1 2 3;
...
約4年 前
解決済み
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]
約4年 前
解決済み
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.
...
約4年 前
解決済み
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];
...
約4年 前
解決済み
UICBioE240 problem 1.12
The mathematical quantities e^x, ln x, and log x are calculated in Matlab using the expressions exp(x), log(x), and log10(x), re...