how to subtract the numeric data stored in two files

7 ビュー (過去 30 日間)
RAHUL KM
RAHUL KM 2014 年 7 月 6 日
コメント済み: RAHUL KM 2014 年 7 月 9 日
Hi,i have two files which consists of numeric data which is stored in 4-columns in each file, where each column represents a particular parameter.How can i subtract the 1st column of the first file with the 1st column of the 2nd file,similarly 2nd column of the first file with the 2nd column of the 2nd file and so on....and the resultant columns should be stored in the new file... I would be greatfull if somebody assists me in solving this problem Thank you in advance.

採用された回答

Geoff Hayes
Geoff Hayes 2014 年 7 月 6 日
Consider using dlmread which will allow you to read the numeric data from each (ASCII) file into separate matrices. Your code can then subtract one matrix from the other, and the result can be written to file using dlmwrite.
  11 件のコメント
Geoff Hayes
Geoff Hayes 2014 年 7 月 9 日
Rahul - the above code and request to review it falls outside the scope of the original question, and will be confusing for future readers of this question. Please create a new post outlining the problem you are experiencing with your code and the help that you are looking for.
As for formatting, highlight the code and press the {}Code button.
RAHUL KM
RAHUL KM 2014 年 7 月 9 日
ya! i selected my code and pressed {}code button but still i am not getting it!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by