Opening multiple figures from directory and extracting X and Y data simultaneously
Afficher commentaires plus anciens
Hello,
I have been using this code to open multiple figures from a directory How to open multiple fig files at once through code? - (mathworks.com). But I also want to extract X and Y data to find a threshold when Y is between some value such as 0.7 and 1.0 as each figure opens. Here is what I have so far:
[figures, path] = uigetfile('directory', '*.fig', 'Multiselect', 'on');
for n = 1:length(figures)
Multi_Figs = [path, filesep,figures{n}];
Op = openfig(Multi_Figs,'invisible');
h = findobj(gca, 'Type', 'line');
x = get(h, 'Xdata');
y = get(h,'Ydata');
ii = find(0.7 < y < 1.0,1);
x_0 = x(ii);
end
I know I may have to use a while loop to find the threshold, but I am struggling a bit as to how to implement that when figures are opened simultaneously.
Thank you,
Daynah
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Loops and Conditional Statements dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
