iLMS知識社群(Sites)師生部落格(Blogs)朝陽首頁(Homepage)TronClass教學平台Login
Position: 曹晉翊 > Matlab
111
by 曹晉翊 2017-10-19 10:59:40, Reply(0), Views(185)
clc;
clear;
t=0:0.01:1;
x1=sin(120*pi*t);
x2=-cos(120*pi*t);
subplot(2,1,1);
 plot(t,x1);
xlabel('t(sec)');
ylabel('x1');
title('x1=sin(120*pi*t)');
text(0.5, sin(60*pi),'\leftarrow sample 1');


subplot(2,1,2);
plot(t,x2);
xlabel('t(sec)');
ylabel('x2');
title('x1=cos(120*pi*t)');
text(0.5, cos(60*pi),'\leftarrow sample 2');

Reply