How to plot variables from a table?
Show older comments
Hi all,
I have a table with variables (as depicted below and attached).

I want to plot the varibales highlighted red (for example). I do this in this way.
% convert the variables to categorical array (because this allows me to plot the variables)
data.time = categorical(data.time);
data.l_avgP = categorical(data.l_avgP);
% plot the variables
figure('color','w');
plot(data.time,data.l_avgP,'b');
ylabel('Average pressure (kPa)');
xlabel ('Time stamp (hours)');
box off;
axis tight;
Which results in this:

Apart from the visible issues, this is very slow (40 sec to produce a plot). Could you please suggest a more effiicient way to do this?
Accepted Answer
More Answers (0)
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!