Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %first, we create a function with
- function [y]=f(x)
- y=sin(x);
- end
- %then we create an array with numbers; for a higher resolution we use 0.1-steps:
- x=0:0.1:2*pi;
- %feed the function:
- [y]=f(x);
- %plot it:
- plot(x,y);grid;
Add Comment
Please, Sign In to add comment