How to load two text files and find the difference between them?

조회 수: 14 (최근 30일)
Jamie Al
Jamie Al 2021년 9월 12일
답변: Jamie Al 2021년 9월 19일
I have some text files with numerical data basically bunch of numbers that I am trying to compare between the two. I wanna subtract each number from the frist file from the second file to give me an idea of how "different" these two files or how far off the numbers are from each other.
I know how to load a text file, just not sure how to perform this subtraction. I will post a text file sample to see how big or the size of these data for your reference.
  댓글 수: 2
Ive J
Ive J 2021년 9월 12일
something like this?
data1 = readmatrix('data1.txt');
data2 = readmatrix('data2.txt');
d = data2 - data1; % or whatever you wanna to compare

댓글을 달려면 로그인하십시오.

채택된 답변

Jamie Al
Jamie Al 2021년 9월 19일
The answer is as stated by Ive J!

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by