Created
October 28, 2016 22:02
-
-
Save dingzeyuli/786bce64b8a174ba7c99ecad90cb578d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lin = @(x) x; | |
sqr = @(x) x.^2; | |
cub = @(x) x.^3; | |
x = -pi/2:pi/1000:pi/2; | |
y1 = atan(lin(tan(x))); | |
y2 = atan(sqr(tan(x))); | |
y3 = atan(cub(tan(x))); | |
figure | |
hold on | |
plot(x, y1) | |
plot(x, y2) | |
plot(x, y3) | |
legend('y=x','y=x^2','y=x^3') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment