How to subtract one table with another and then plotting the difference

6 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

Cris LaPierre
Cris LaPierre el 12 de Ag. de 2020
Editada: Cris LaPierre el 2 de En. de 2021
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))
When it comes to accessing data in a table, I find I keep referring back to this page.

Más respuestas (1)

Barghava sri venkatesh siva kumar Ruthala
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 comentarios
Cris LaPierre
Cris LaPierre el 2 de En. de 2021
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
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

Iniciar sesión para comentar.

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by