Plotting from a .mat file takes too long, what to do?
1 view (last 30 days)
Show older comments
Hi all,
I have a small data to be plotted but having problem. Data is read from xlsx file and I saved it to mat file. attached file has 2 variables, each 801 long.
But when plotting, figure windows opens in background with no plot, also i cant bring it to front by clicking. It must be trivial but i cant see it. what can be the problem?
Thanks
Utku
0 Comments
Accepted Answer
Star Strider
on 18 Jan 2016
I would have to see your code to see what the problem could be.
It plots for me without problems:
D = load('utku g data.mat');
x = D.x;
y = D.y;
figure(1)
plot(x, y)
grid
2 Comments
Star Strider
on 18 Jan 2016
My pleasure.
The figure call is not necessary, but since MATLAB will plot in the available figure window, specifying a new one each time will allow you to plot several figures in different figure windows without overplotting them (unless you want to).
For instance, if you plot:
figure(1)
plot(x1, y1)
plot(x2, y2)
the second plot call replaces the first, so you will only see (x2,y2) plotted. If you specify different figures:
figure(1)
plot(x1, y1)
figure(2)
plot(x2, y2)
each will plot in its own figure window.
More Answers (0)
See Also
Categories
Find more on Line Plots 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!