How to format a cell array to different rows
이전 댓글 표시
With this following code:
raw = fileread('testdata.txt');
data = regexp(raw,'[+-]?\d+\.?\d*', 'match');
g=(cellfun(@str2num,data))
It results in g to look like: [1003 ...... 1009...1016....1020] , where its a 1x242 array.
I want to split into multiple rows to have the data look like this instead:
[1003, ,........;
1009 , .......;
1016..........;
1020.........; ]
Could anyone provide some help in how to accomplish this?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!