where are my data?

1 vue (au cours des 30 derniers jours)
Paul Rogers
Paul Rogers le 14 Jan 2020
Commenté : Star Strider le 14 Jan 2020
I plot a figure by using a function from a package.
Now I'd like to know the x and y values once I plot the curve.
Where are they stored

Réponse acceptée

Star Strider
Star Strider le 14 Jan 2020
Try this:
F = openfig('untitled.fig');
ax = gca;
lines = findobj(ax, 'Type','Line');
for k = 1:numel(lines)
x{k,:} = lines(k).XData;
y{k,:} = lines(k).YData;
end
The x- and y-data for each line are in their appropriate cell arrays.
  4 commentaires
Paul Rogers
Paul Rogers le 14 Jan 2020
for k = 1:numel(lines)
figure(4)
plot(FlowVector,y{k,:})
grid on
hold on
end
here's is the solution.
Man, thank you a lot, you really helped me.
I couldn't figured out without your help.
Star Strider
Star Strider le 14 Jan 2020
As always, my pleasure!
That’s what I’m here for!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Creating, Deleting, and Querying Graphics Objects dans Help Center et File Exchange

Tags

Produits


Version

R2014b

Community Treasure Hunt

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

Start Hunting!

Translated by