Home > other >  MATLAB three-dimensional matrix
MATLAB three-dimensional matrix

Time:11-17

Is 1 x1y, 1 x2y, 1 x3y... 1 x90y then 2 x1y, 2 x2y... 2 x90y x90y until 89, there are 89 x 90 TXT file is x and y coordinates each file there are 51 row 2 column in the first column is useless, I need is the second column number to make it 89 x 90 x 51 three-dimensional matrix, coordinates must be for good, I was a small white, just self-study teachers leave a task, just a few days thank you!

CodePudding user response:

Change the TXT suffix to CSV, let the matlab is read, a cell array
A=zeros (89, 90, 51);
For ii=1:8 9
For jj=1:9 0
READ as a cell array CA
A (ii, jj, :)=CA {:, 2};
End
end
  • Related