You are on page 1of 1

2/10/16 3:32 PM

C:\Users\pglab-5\Documents\MATLAB\Anil.m

for i = 1:101
t(i) = 6*(i-1)/100;
x(i) = 3.1048*sin(5*t(i)+1.3102);
v(i) = 15.524*cos(5*t(i)+1.3102);
a(i) = -77.62*sin(5*t(i)+1.3102);
end
subplot(311);
plot(t,x);
ylabel('x(t)');
xlabel('t');
title('Solution for Problem No. 1');
subplot(312);
plot(t,v);
ylabel('v(t)');
xlabel('t');
subplot(313);
plot(t,a);
ylabel('a(t)');
xlabel('t');

1 of 1

You might also like