フィルターのクリア

Help with saving a .txt file

2 ビュー (過去 30 日間)
aurc89
aurc89 2015 年 3 月 18 日
回答済み: Alka Nair 2015 年 3 月 18 日
I need to generate a code doing the following steps: 1) load two .txt (or .dat) files from a folder (they have same dimension: double MxN); 2) make the difference between the two matrices; 3) save this new matrix as a .txt (or .dat) file in the same folder, with a name I can choose. Thanks !

回答 (1 件)

Alka Nair
Alka Nair 2015 年 3 月 18 日
Use FSCANF function to read data from text file to MATLAB. Please refer to the following link to find information on FSCANF:
You can use the resulting arrays for comparison or finding difference. Then use FPRINTF to write data to text file. See the documentation for FPRINTF at the following link:
Kindly accept the answer if this is what you wanted to know so that community users can use it later.

カテゴリ

Help Center および File ExchangeLow-Level File I/O についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by