Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x.
For instance if x=2 then y must be 1+2+3+4=10.
12年以上 前
解決済み
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
12年以上 前
解決済み
Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input matrix and row and column, output the index of th...
12年以上 前
解決済み
Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody.
Return the largest positive integer MATLAB can handle.
12年以上 前
解決済み
Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input vector of numbers, output a square array with the...
12年以上 前
解決済み
Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input vector, output true or false whether it is a colu...
12年以上 前
解決済み
Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input variable 'x', save it to disk in a file named 'co...
12年以上 前
解決済み
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...