Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- t = 0 : 0.001 : pi / 2; % Create a vector of a lot of values between 0 and pi / 2
- % So that time appears continuous when we plot graphs
- figure
- hold on
- a = 1;
- f = a * sin(t);
- plot(t, f);
- a = 2;
- f = a * sin(t);
- plot(t, f);
- a = 1/2;
- f = a * sin(t);
- plot(t, f);
- xlabel('Time');
- ylabel('Function f(t)')
- title('Function f with varying values of a')
- legend('a = 1', 'a = 2', 'a = 0.5')
- hold off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement