How to plot x^2 - y^2 = 1?
Show older comments
Very simple question to understand I think.
Accepted Answer
More Answers (1)
Image Analyst
on 14 Nov 2020
Try this:
% x^2 - y^2 = 1
% Or y = sqrt(x^2 - 1)
x = linspace(-2, 2, 1000);
y = sqrt(x .^ 2 - 1);
plot(x, y, 'b-', 'LineWidth', 2);
title('y = sqrt(x .^ 2 - 1)', 'FontSize', 15, 'Interpreter', 'none');
xlabel('x', 'FontSize', 15);
ylabel('y', 'FontSize', 15);
grid on;

Categories
Find more on Contour Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!