Created
February 9, 2014 19:49
-
-
Save anonymous/8904953 to your computer and use it in GitHub Desktop.
Pattern: Graph y(x) for different ranges of a
This file contains hidden or 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
| %Graph f(x) for different ranges of a: | |
| fun = @(x,a) a(1):1/floor(length(x)/(length(a)-1)):a(end); | |
| dx=1/100; | |
| x=0.1:dx:10; | |
| a1=-1:1; | |
| a1range=fun(x,a1); %make the number of clips of a match the number | |
| %of clips of x | |
| a2=-10:0; | |
| a2range=fun(x,a2); | |
| y1=exp(a1range.*sqrt(x)); | |
| plot(x,y1); | |
| title('plots of exp(a*sqrt(x))'); | |
| xlabel('x'); | |
| ylabel('y'); | |
| hold on; | |
| y2=exp(a2range.*sqrt(x)); | |
| plot(x,y2); | |
| hold off; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment