How can I break a long column vector (281820X1) into 140 short column vectors (2013X1)?
조회 수: 1 (최근 30일)
이전 댓글 표시
I collected the raw data from a Raman image which acquired 140 Raman spectra from a 14X10 rectangular area. The resulting data file contains 281820 rows for all the spectra so how should I restore the 140 individual data files?
댓글 수: 0
채택된 답변
Les Beckham
2023년 12월 15일
편집: Les Beckham
2023년 12월 15일
Use reshape
data = (1:281820)';
cols = 140;
rows = numel(data) / cols;
data_reshaped = reshape(data, [rows cols]);
whos
Also, if you are just getting started with Matlab, I would highly recommend that you take a couple of hours to go through the free online tutorial: Matlab Onramp
댓글 수: 4
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!