⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clptdscf.m

📁 Programs for the book Advanced Engineering Mathematics using MATLAB, 2ndEd.
💻 M
字号:
function clptdscf(f,F,xunit)
% CALL: clptdscf(f,F,xunit) Plot a discrete spectrum [f F]
%  Input to function is 
%	f 	- frequencies 
%	F 	- spectral values
%	xunit	- units of frequency (Hz or rad/sec)
%  Input title of graph from keyboard
nl=length(f);                % Number of f points
fmin=min(f);                 %  and range
fmax=max(f);
Fmax=max(F);
% Plotting range, lengthen axes by 10%  
Fmaxp=Fmax+.1*Fmax;
fminp=fmin-.1*fmax;
fmaxp=fmax+.1*fmax;
%
title1=input('Title ', 's' );
clf                          % Clear any figures
axis([fminp fmaxp 0 Fmaxp])  % Manual scaling
for I=1:nl,
 fplots=[f(I) f(I)];
 Fplot=[0 F(I)];
 plot(fplots,Fplot)          % Plot one line at a time 	
hold on
end
title(title1)
ylabel('Amplitude')
xlabel(['Frequency in ', xunit])

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -