How to make my graph longer?
5 views (last 30 days)
Show older comments
a=(-10:2:10);
f=(5.*a-cos(2+a.^2)+sin(0.25.*a+2));
plot([a,f],'--');
hold on;
osx=zeros(size(a));
plot([a,f],'b--');
plot(osx)
hold off
So i have this code,for some reason I can't make my yellow( osx=zeros) be longer and it ends in the middle of the graph,while I need it to go further,if not endlessly
0 Comments
Accepted Answer
Image Analyst
on 5 Nov 2023
Instead of osx, just use yline
yline(0, 'Color', 'y', 'LineWidth', 3);
0 Comments
More Answers (0)
See Also
Categories
Find more on Specifying Target for Graphics Output 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!