I have a matrix MxN and I want to convert to a vector MNx1 with all the elements of a row from the matrix as elements of a vector.
I tried using reshape, but I was not successful.
Here is a small piece of code and the expected result.
S=[0 1
1 0
1 1
1 1 ]
Expected Result:
S_prime= [ 0 1 1 0 1 1 1 1]
PS: Using a loop and concatenation is not an option, I'm sure there is a simple direct jump technique that I don't know about.
thank
Kiran source
share