Info
This question is closed. Reopen it to edit or answer.
How to add a reference horizontal line to an existing plot
1 view (last 30 days)
Show older comments
TRISHITA BANERJEE
on 11 Jun 2018
Closed: TRISHITA BANERJEE
on 13 Jun 2018
I want to add a reference horizontal line at about -86 db in my plot.How can I do it
0 Comments
Accepted Answer
More Answers (1)
KSSV
on 11 Jun 2018
Check the below demo code:
x = linspace(0,2*pi) ;
y = sin(x) ;
plot(x,y)
% reference line at x = 0.6
xi = linspace(min(x),max(x)) ;
yi = 0.6*ones(size(xi)) ;
hold on
plot(xi,yi) ;
0 Comments
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!