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!