How can I import and read a .plt file?
151 ビュー (過去 30 日間)
古いコメントを表示
I am dealing with .plt files and I need to find a way for matlab to read them and put them in a matrix.
2 件のコメント
dpb
2022 年 7 月 14 日
Well, that'll all depend on who wrote the files and what their content/format is...we have no idea where you got these from..
Along with that description, attaching one (use paperclip icon) would be a start.
採用された回答
dpb
2022 年 7 月 14 日
That's essentially trivial since they're just text files -- to upload one, just rename it ".txt" temporarily; what the name is doesn't matter a lick...
data=readmatrix('yourfile.plt','commentstyle','#');
will give you all the data in an array -- you can separate by what appears to be four rows/section.
Or
data=readlines('yourfile.plt');
will leave you with a string array including the comment lines; you can locate those and then convert the sections between to numeric to keep the sections separate.
0 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!