finding the two coordinates

4 vues (au cours des 30 derniers jours)
Babu Sankhi
Babu Sankhi le 1 Oct 2020
Commenté : Babu Sankhi le 4 Oct 2020
Hi all,
I have a plot from experimental data. I want to find the two values of x that corresponds to y=0. Basically, I want to find the coordinates A and B ( in both coordinates y=0) in the file attached below. I tried by using " find (x==0)" but it gave me blank. Can you please help how can I find them?
Thank you

Réponse acceptée

Matt J
Matt J le 2 Oct 2020
fzero(@(x)interp1(A,x), [1,numel(A)])
  13 commentaires
Matt J
Matt J le 4 Oct 2020
Modifié(e) : Matt J le 4 Oct 2020
xvalue = fzero( @(xq)interp1(x,y+4.54,xq) , [min(x),max(x)] )% x value at y=-4.54
Babu Sankhi
Babu Sankhi le 4 Oct 2020
Thank you ,
It worked now.

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by