看板 MATLAB 關於我們 聯絡資訊
請教各位大大 若 data <12x40x43700 double> 要如何轉成二維的資料且是從橫的開始排呢? 變成這樣 temp <43700x480 double> 有試過reshape 不過他是從直的開始排 以下是我使用的方式 temp = reshape(data,43700,480); 請問應該要使用什麼指令呢? 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.115.155.201 ※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1427307013.A.D45.html
sunev: permute 03/26 03:15
permute試不太出來 試過發現可以這樣 temp = reshape(data,480,43700); x=temp'; ※ 編輯: hnuuy (140.115.155.201), 03/26/2015 11:51:54
DKer: 兩行可以縮成一行吧 temp=reshape(data,480,43700)'; 03/26 14:01
sunev: permute 是transpose的推廣,在你的情況下可以寫成 03/26 20:04
sunev: temp=reshape(permute(data,[3 1 2]),43700,[]); 03/26 20:06
sunev: 或是temp=premute(reshape(data,480,[]),[2 1]); 03/26 20:06