Matrix Reshape and deleting elements in a matrix

Hello, I am a novice user of MATLAB. I want to know about matrix reshaping to apply for some data. I have a .txt file consist of 137*10 elements in that file. I want it to be reshaped into 19*72 elements. As 19*72= 1368 elements as an aggregate when compared to original 1370 elements, I want to delete the last two elements in the original file and remaining 1368 elements should be arranged in 19*72 form...any suggestion...

 Accepted Answer

x = original matrix
result = reshape(x(1:end-2),19,72);

More Answers (0)

Categories

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!