Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How I can read notbad file Line by Line?

1 回表示 (過去 30 日間)
Ameligege
Ameligege 2015 年 3 月 28 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I saved matrices in text file line by line and now I want to read these matrices in same way that I saved?
  2 件のコメント
Geoff Hayes
Geoff Hayes 2015 年 3 月 28 日
Ameligege - what is the code that you used to save the data to file?
Ameligege
Ameligege 2015 年 3 月 28 日
dlmwrite('Features.txt',reshapemat,'-append', 'newline', 'pc');

回答 (1 件)

Image Analyst
Image Analyst 2015 年 3 月 28 日
Try dlmread(), csvread(), importdata(), fgetl(), textscan(), or readtable(). Lots of ways to do it. Examples are in the help. Just pick one or two and give it a try. In the event someone did want to do it for you, you didn't attach your file, so they can't.
  19 件のコメント
Image Analyst
Image Analyst 2015 年 3 月 29 日
編集済み: Image Analyst 2015 年 3 月 29 日
Here is the code I used:
s=load('myarray.mat')
m = s.reshapemat;
Then examine m with the variable editor. And you attached the same features.txt as before. It totally does not match your reshapemat in the slightest.
Ameligege
Ameligege 2015 年 3 月 29 日
Look :( I had to use this function reshapemat=reshape(features, 1, []);
to save the result matrix in one line.
because I want to save each matrix in one line like the notbad that I sent
If you have another way to do the same thing ,please tell me?
Thank you for the sincere help ,I appreciate you for your time and your effort

この質問は閉じられています。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by