I have a table in workspace and want to plot the data in it. How do I do that?

I have uploaded a .csv file into my workspace and it is a 1000x2 table with columns Time and Voltage. I want to plot Voltage versus Time but cannot do plot(Voltage, Time) because Matlab does not recognize those variables. Any help?

Risposte (2)

If T is the name of your table variable, then:

plot(T.Time, T.Voltage) 
plot(NameOfYourTable, "Time", "Voltage")
%or, on older versions of MATLAB
plot(NameOfYourTable.Time, NameOfYourTable.Voltage)

Richiesto:

il 3 Set 2023

Risposto:

il 3 Set 2023

Community Treasure Hunt

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

Start Hunting!

Translated by