Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1. %%
- x = -20:0.15:20;
- y=sin(x).^2;
- plot(x,y)
- xlim([5*pi 5*pi])
- %%
- 2. %%
- N = 100 ;
- x = -4:4:N ;
- y = -4:4:N ;
- Z = X.^2-Y.^2 ;
- surf(X,Y,Z)
- %%
- 3. %%
- x=0:0.1:10;
- y0=besselj(0,x);
- y1=besselj(1,x);
- y2=besselj(2,x);
- plot(x,y0,'-m',x,y1,'--r',x,y2,'-.k')
- %%
- 4. %%
- r = randi(6,1000,1);
- hist = histogram(r);
- hist
- %%
- 5.
- %%
- x=-20:0.15:20;
- y=sin(1.*x);
- y2=sin(2.*x);
- y3=sin(3.*x);
- y4=sin(4.*x);
- y5=sin(5.*x);
- y6=sin(6.*x);
- y7=sin(7.*x);
- y8=sin(8.*x);
- y9=sin(9.*x);
- y10=sin(10.*x);
- plot(x,y,x,y2,x,y3,x,y4,x,y5,x,y6,x,y7,x,y8,x,y9,x,y10)
- %%
- 6.
- %%
- [x,y,z] = sphere;
- radius = 1;
- x = x * radius;
- y = y * radius;
- z = z * radius;
- surf(x,y,z)
- %%
Add Comment
Please, Sign In to add comment