What is the code to use for format spec in order to get matrix table where each column contain contain 4 data?
1 回表示 (過去 30 日間)
古いコメントを表示
if true
Data = fopen('Track.txt', 'r');
formatspec = '';
Matrix = [4,inf];
DataInMatrix = fscanf(Data, formatspec, Matrix);
end
0 件のコメント
採用された回答
Star Strider
2015 年 5 月 5 日
This works:
fidi = fopen('Track.txt','r');
Data = textscan(fidi, '%s%f', 'Delimiter',':');
DataInMatrix = reshape(Data{2}, 4, []);
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!