Remove the positive integers.
Given array,x, remove all the positive numbers and display ouput as y.
Example x=[1 -2 3 -4] , output is y=[-2 -4].
約9年 前
解決済み
Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square.
...
約9年 前
解決済み
subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.
約9年 前
解決済み
Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.
約9年 前
解決済み
Area of a circle
Given the radius x, y would be the area of a circle.
Pi = 3.1416
約9年 前
解決済み
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1.
Hint: use increment.
Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9]
Replace the 2nd row with 8s
**remember to create matrix G
約9年 前
解決済み
Multiple if statements
Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement tha...
約9年 前
解決済み
find a number (cheat)
find a number input^5 = input
the out put should be the number. try cheating
約9年 前
解決済み
Food safety
Assign safeTemperature with 1 if foodTemperature is less than 40 or greater than 165.
約9年 前
解決済み
While loop: Summation
Write a while loop that assigns summedValue with the sum of all values from 1 to userNum. Assume userNum is always greater than ...
Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...