Find X Values for Graph under conditions

I have a graph showing various regions with their y values plotted against time (x values)
I want to know which times (X values) any of my lines are:
<10% of Global Line
and
>70% of global line
so then i will know the months with the large or small results.
I have shown the graph here.

3 Comments

When you destroy your question like this, you insult the person who spent a lot of time in answering your question. That makes it less likely they will bother to invest the same time in you again.
Original question by Ethan Anderson:
Find X Values for Graph under conditions
I have a graph showing various regions with their y values plotted against time (x values)
I want to know which times (X values) any of my lines are:
<10% of Global Line
and
>70% of global line
so then i will know the months with the large or small results.
I have shown the graph here.
(Answers Dev) Restored edit

Sign in to comment.

Answers (1)

Ameer Hamza
Ameer Hamza on 11 May 2020
Edited: Ameer Hamza on 11 May 2020
Try the following example. I have tried to create data points similar to the points in your graph
x = linspace(0, 10, 100);
global_line = x.^2.9;
y1 = 2.*x.^1.3;
y2 = 1.*x.^1.2;
figure;
ax = axes();
plot(x, global_line, x, y1, x, y2)
legend({'global', 'y1', 'y2'})
figure;
subplot(2,1,1);
hold on
plot(x, y1 < 0.1*global_line);
plot(x, y1 > 0.7*global_line);
legend({'y1 < 0.1*global line', 'y1 > 0.7*global line'});
subplot(2,1,2);
hold on
plot(x, y2 < 0.1*global_line);
plot(x, y2 > 0.7*global_line);
legend({'y1 < 0.1*global line', 'y1 > 0.7*global line'});

Categories

Find more on Creating, Deleting, and Querying Graphics Objects in Help Center and File Exchange

Tags

Asked:

on 11 May 2020

Commented:

on 14 May 2020

Community Treasure Hunt

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

Start Hunting!