Plotting the equation and show resolution
1 回表示 (過去 30 日間)
古いコメントを表示
Plot the magnitude (absolute value) and phase (angle) of the following function
i=sqrt(-1);
G(i*omega)= (-0.72*exp(-i*30*omega))/1+(i*50*omega);
from omega=0.001 to 1000 rad/sec.
Take sufficient points; say 1000, within the range 0.001 ≤ omega ≤ 1000 rad/sec to increase the resolution of your plots
0 件のコメント
回答 (1 件)
Kush
2023 年 6 月 30 日
% Define the frequency range
omega = logspace(-3, 3, 1000);
% Define the function
G = @(omega) (-0.72*exp(-1*30*omega))./(1+(50*omega));
% Calculate the magnitude and phase
magnitude = abs(G(1i*omega));
phase = angle(G(1i*omega));
% Plot the magnitude figure;
semilogx(omega, magnitude);
xlabel('Frequency (rad/sec)');
ylabel('Magnitude');
title('Magnitude Plot');
% Plot the phase figure;
semilogx(omega, phase);
xlabel('Frequency (rad/sec)');
ylabel('Phase (rad)');
title('Phase Plot');
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!