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...
7 years 前
已解决
Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input matrix, generate an output matrix that consists o...
7 years 前
已解决
"mirror" matrix
Create n x 2n "mirror" matrix of this type:
e.g. for n = 2
m = [1 2 2 1;1 2 2 1]
e.g. for n = 3
m = [1 2 3 3 2 1...
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...
7 years 前
已解决
Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...
7 years 前
已解决
Combine the first and last names
MATLAB R2016 provides a rich set of functions to work with string arrays. In this problem, you will be given two string arrays o...