blob: e376d2dabc4628a89b98d4f860ce7799ac2755b7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
clear;
clc;
close;
t=0:1/100:10;
w=1;
theta=%pi/3;
T=2*%pi/w;
x=cos(t*w+theta);
y=cos((t+T)*w+theta);
if ceil(x)==ceil(y) then
disp('cos(wo*t+theta) is periodic with T=2*pi/W0')
else
disp('nonperiodic')
end
|