How can I specify a tolerance for data written in two text files?
2 ビュー (過去 30 日間)
古いコメントを表示
Kindly, I have data in two text files (e.g. attached) having one column each (y) and (x). I need to specify a tolorance as follows
1- combined these two text files in one.
2- get the difference between these two columns (e.g. (y^2 - x^2)^0.5 = value
3- write an output which is the maximum difference of the whole set (one value).
0 件のコメント
回答 (1 件)
madhan ravi
2019 年 1 月 31 日
編集済み: madhan ravi
2019 年 1 月 31 日
Sounds like homework:
1) Load the files assign it to a variable x and y.
2) Use it in the formula.
3) Use max() to find the maximum value.
4) Use dlmwrite() or any other function to export it to a text file.
5 件のコメント
madhan ravi
2019 年 1 月 31 日
編集済み: madhan ravi
2019 年 1 月 31 日
Use
-(y-x)% instead of sqrt(y^2-x^2)
Btw I am confused :D
参考
カテゴリ
Help Center および File Exchange で Get Started with MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!