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...
4 years ago
Solved
Count up then down
Create a function that produces counting up from 0 up to n then down to 0
n=2 --> 0 1 2 1 0
n=3 --> ...
4 years ago
Solved
Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 .
Example:
n=5
ans=
[0 0 0 0 1
0 0 0 0 1
0 0 ...
4 years ago
Solved
Create a vector
Create a vector from 0 to n by intervals of 2.