adplus-dvertising
frame-decoration

Question

Which code can be used for changing the dimensions of a matrix as follows?
Input matrix: 1     2     3         Output matrix: 1 4 2 5 3 6
                         4     5     6

a.

reshape([1,2,3;4,5,6],1,6)

b.

reshape([1,2,3;4,5,6];1;6)

c.

reshape([1,2,3;4,5,6]:1:6)

d.

reshape([1,2,3;4,5,6],6,1)

Posted under MATLAB

Answer: (a).reshape([1,2,3;4,5,6],1,6)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Which code can be used for changing the dimensions of a matrix as follows?

Similar Questions

Discover Related MCQs

Q. What is the function used to multiply a matrix, A, with itself n times?

Q. Which operator set is used for left and right division respectively?

Q. If A and B are two matrices, such that a./b=b.\a, what is concluded?

Q. If a./b=(b./a)ᵀ, what can be concluded about the matrices a and b?

Q. What is the difference between a[] and a{}?

Q. All matrices are vectors but all vectors are not matrices in MATLAB.

Q. If the dimensions of vectors don’t match, the plot command will always give an error.

Q. What is the name of a primary function?

Q. Predominantly, what are the two kinds of errors in MATLAB programs?

Q. If the program demands evaluation of multiple, only decimal, values of the same function, what is the better way amongst the following?

Q. What are persistent variables?

Q. Variables need to have same name while being passed from the primary function to the sub-function.

Q. Which command can be used for single step execution in debugging mode?

Q. How do we access a global variable in nested functions?

Q. How does MATLAB help in passing function arguments?

Q. Which line is treated as H1 line?

Q. What are the functions to see the graph of a continuous and a discrete function?

Q. If we want to plot matrix arguments, which of the following gets plotted?

Q. To bring the scale of each axis to logarithmically spaced, the student entered ‘semilogx()’. What really happened?

Q. After trying to plot a pie-chart, the student finds that the function he used is rose(). What is the nature of data used by the student if an output graph is generated?