create a circulant matrix
create a circulant matrix

5年弱 前

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].

5年弱 前

Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

5年弱 前

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.

5年弱 前

Square Diagonal
If n is the given number, then make a diagonal matrix of size 2*2 with the square of that number.

5年弱 前

Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

5年弱 前

Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

5年弱 前

Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

5年弱 前

square root
Find the square root (y) of an input (x).

5年弱 前

prime test
find largest 2 digit prime number

5年弱 前

factorial of a number x
Factorial of a number x

5年弱 前

Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

5年弱 前

Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

5年弱 前

Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

5年弱 前

Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

5年弱 前

Array of Ones
Create a 100 X 100 array of ones.

5年弱 前

Times 3 problem
When you enter the number, it should return the number multiplied by 3

5年弱 前

reverse string
input='rama' output='amar'

5年弱 前

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

5年弱 前

Multiple if statements
Write an if-statement that subtracts 5 from outputValue if amplitudeResponse is greater than 10. Write a second if-statement tha...

5年弱 前

find a number (cheat)
find a number input^5 = input the out put should be the number. try cheating

5年弱 前

Food safety
Assign safeTemperature with 1 if foodTemperature is less than 40 or greater than 165.

5年弱 前

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 ...

5年弱 前

test_first
just to test

5年弱 前

cheating technique2
there are some ways to get hints just by looking at the test suits to cheat. try.

5年弱 前

Sudoku square
We have a small Sudoku square, but one number is missing. x = [ 1 5 4 8 6 3 0 9 7 ] Make a function, wher...

5年弱 前

Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

5年弱 前

Writing a function: MaxValue()
Write a local function named MaxValue that returns the maximum of two inputs numA and numB.

5年弱 前

Given a matrix, return the last eigen value
Given a matrix, return the first eigen value For example: x = magic(5) 17 24 1 8 15 23 5 7 14 ...

5年弱 前

Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

5年弱 前