フィルターのクリア

Who can I append a matrix on exist file ?

2 ビュー (過去 30 日間)
Rahim Rahim
Rahim Rahim 2020 年 12 月 16 日
回答済み: Cris LaPierre 2020 年 12 月 20 日
I have a matrix
X=[];
WriteFile(X,'file' );
I want to add a lot of matrix to this file, ( all the matrix have the same dimention), I used dlmwrite -append but does not work :
for i=1:10
dlmwrite('file',X,'-append')
end
what is the problem ?

回答 (1 件)

Cris LaPierre
Cris LaPierre 2020 年 12 月 20 日
What are you expecting to see with this example? You are appending an empty matrix, so it would be impossible to tell if it has done what you want or not.
Also, what is wrtiefile? That does not appear to be a MATLAB function. However, for this example, you should use dlmwrite. It doesn't make sense to use two different write commands.
On that note, notice that the documentaiton now gives the following warning:
dlmwrite is not recommended. Use writematrix instead. For more information, see Compatibility Considerations.

カテゴリ

Help Center および File ExchangeText Files についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by