www.gusucode.com > rf 案例源码程序 matlab代码 > rf/DefineEvaluateAndVisualizeARationalFunctionExample.m
%% Define, Evaluate and Visualize a Rational Function % Construct a rational function object, |rat|, with poles at -4 Mrad/s, -3 % Grad/s,and -5 Grad/s and residues of 600 Mrad/s,2 Grad/s and 4 Grad/s. rat=rfmodel.rational('A',[-5e9,-3e9,-4e6],'C',[6e8,2e9,4e9]); %% % Perform frequency-domain analysis from 1.0 MHz to 3.0 GHz. f = [1e6:1.0e7:3e9]; %% % Plot the resulting frequency response in decibels on the X-Y plane. [resp,freq]=freqresp(rat,f); figure plot(freq/1e9,20*log10(abs(resp))); xlabel('Frequency (GHz)') ylabel('Magnitude (dB)')