How interchange Rows vs Columns?

Hi, With the script bellow I am getting the numbers in 60 rows and 300 columns. How can I make it vice versa: 60 columns and 300 rows? Thanks for i=1:size(EEG.data,3) filename=['ep' num2str(i) '_uni9.txt']; dlmwrite(filename, EEG.data(:,:,i) ,'delimiter', ' '); end

 采纳的回答

Use permute:
EEG.data = permute(EEG.data, [2, 1, 3]);

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Matrix Indexing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by