How to subtract one table with another and then plotting the difference
조회 수: 8 (최근 30일)
이전 댓글 표시
Natalie Cannon
2020년 8월 12일
댓글: Barghava sri venkatesh siva kumar Ruthala
2021년 1월 2일
I have 2 tables loaded in my workspace named 'FinalMeasurement' & 'InitialMeasurement'. Both tables are 201x2 and have the same format. How do I subtract the 'InitialMeasurement' table from the 'FinalMeasurement' table and then plot the found difference?
Thanks for any guidance.
댓글 수: 0
채택된 답변
Cris LaPierre
2020년 8월 12일
편집: Cris LaPierre
2021년 1월 2일
The result of this code is a matrix, not a table. You haven't specified X and Y, so I'll assume the first column is X and the second is Y.
D = finalT{:,:}-initT{:,:};
plot(D(:,1),D(:,2))
추가 답변 (1개)
Barghava sri venkatesh siva kumar Ruthala
2021년 1월 2일
hi, i have a data of table (10*39), i need to plot the difference between 2 tables data, of same order. two plots should be on the same graph and the difference should be highlighted. i tried with above code. but i cannot find the difference. please help me with this problem. thank you
댓글 수: 2
Cris LaPierre
2021년 1월 2일
Make sure you data is
- a table (this is a datatype in MATLAB and not a matrix/array)
- You are using your table names and not the ones in my code
Barghava sri venkatesh siva kumar Ruthala
2021년 1월 2일
the below is the data, i am using the table names as per my saved names. i dont understand why it is not plotted. can you please help me with this. thank you

참고 항목
카테고리
Help Center 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!