How to know if a vector lies inside two vectors
1 view (last 30 days)
Show older comments
How to write the code to see if the blue graph is between two other graphs. If the vector is in two it will show 1, if not 0.
0 Comments
Accepted Answer
Ameer Hamza
on 22 Nov 2020
Edited: Ameer Hamza
on 22 Nov 2020
Try this
x_low; % lower line in red
x_upper; % upper line in red
y; % line in blue
tf = all((x_low<=y)&(y<=x_high))
2 Comments
More Answers (0)
See Also
Categories
Find more on Graph and Network Algorithms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!