What does xlim() do in my code and why are its brackets empty?
Show older comments
Hey guys,
I like adding a straight horizontal line at y = 0 to my plots therefore I am using the code shown below. It's working perfectly for my purposes so there is no need to change anything.
plot(x, z);
line(xlim(), [0,0], 'LineWidth', 1, 'Color', 'k', 'LineStyle','--');
grid on;
xlabel('This is the label for the x-axis')
ylabel('This is the label for the y-axis')
Since I found this code on the internet I am wondering what xlim() does in my code and why its brackets are empty?
Is there something generell to say about the function of empty round brackets () ?
Thanks for your help,
Best,
Sven
1 Comment
Stephen23
on 7 May 2021
Accepted Answer
More Answers (0)
Categories
Find more on Logical 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!