Guest User

Untitled

a guest
Jan 21st, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. %first, we create a function with
  2. function [y]=f(x)
  3. y=sin(x);
  4. end
  5.  
  6. %then we create an array with numbers; for a higher resolution we use 0.1-steps:
  7. x=0:0.1:2*pi;
  8.  
  9. %feed the function:
  10. [y]=f(x);
  11.  
  12. %plot it:
  13. plot(x,y);grid;
Add Comment
Please, Sign In to add comment