How do I get MATlab to output the value of a point on a plot?

2 views (last 30 days)
I have a plot of [t,A] where A is a vector with 3 components (Arr,Azz,a). I need to find the value of t when a drops to a negligible value ~10^-3.

Accepted Answer

Star Strider
Star Strider on 27 Feb 2015
Something like this would work:
t = linspace(0,10);
a = exp(-t);
ia = find(a <= 1E-3, 1, 'first');
t_thr = t(ia);
figure(1)
plot(t, a)
hold on
plot(t_thr, a(ia), 'bp')
hold off
grid
  2 Comments
Joseph Clegg
Joseph Clegg on 27 Feb 2015
That's perfect thanks I had up to the ia line but didn't think of the next line.
Star Strider
Star Strider on 27 Feb 2015
My pleasure!
If I solved your problem, I would appreciate it if you would Accept my Answer.

Sign in to comment.

More Answers (0)

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!