Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes.
---
You may already know how to <http://www.mathworks....
5 years ago
Solved
Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...
5 years ago
Solved
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because
6 = 1 + 2 + 3
which can be displa...
5 years ago
Solved
Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle.
<<https://i.imgu...
5 years ago
Solved
Remove the vowels
Remove all the vowels in the given phrase.
Example:
Input s1 = 'Jack and Jill went up the hill'
Output s2 is 'Jck nd Jll wn...
5 years ago
Solved
Transpose the Matrix
Transpose the given matrix, e.g. x=[a b;c d]
transpose of x = [a c;b d]
5 years ago
Solved
The great 82-year-old
Let's answer the question below;
'I am *x* years old and I have never written programs.
If I study from now, will I be able ...
5 years ago
Solved
Square a Number
Given an input x, return y, which is equal to the square of x.
5 years ago
Solved
Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next.
Example input:
x = [10 2];
5 years ago
Solved
Solve expression I
Solve expression (1+sin(x))/cos(x)+cos(x)/(1+sin(x)) for given vector x.