?? saw.m
字號:
function z=saw(t)
% The function SAW generates a saw tooth function.
%
% Calling sequence-
% z=saw(t)
%
% Input-
% t - column vector data t(n)
% Output-
% z - column vector data z(n) that specifies the values
% of saw tooth function
% Z.Shen Initial
%----- Initialize
n=length(t);
z=zeros(n,1);
T=2.*pi; %period
%----- Generate the values
for i=1:n
x=mod(t(i),T);
z(i)=-1.+2/T*x;
end
return
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -