MATLAB DOES NOT CALCULATE THE ABSOLUTE VALUE

1 回表示 (過去 30 日間)
vissia volpe
vissia volpe 2020 年 11 月 29 日
回答済み: Walter Roberson 2020 年 11 月 29 日
I USE THE FUNCTION abs ON MATLAB, BUT WHEN I RUN THE PROGRAMM DOES NOT GIVE ME THE RIGHT RESULT WITH ROOTS
clear all
close all
clc
%ESERCITAZIONE DI CALCOLO_2
%PUNTO_1
syms s omega i
a=2;
b=2;
c=9;
d=5;
e=6;
f=2;
n=(b*s+1)*2*a;
x=(c+f)*s+1;
y=(d+e)*s+1;
z=(c+a)*s+1;
h=(d+f+1)*s+1;
G = (n)/(x*y*z*h)
disp('FUNZIONE DI TRAFERIMENTO IN FUNZIONE DI OMEGA ')
G_OMEGA=subs(G,s,i*omega)
AR_OMEGA=abs(G_OMEGA )

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 11 月 29 日
To get anywhere useful in a few lines, we have to make the unjustified assumption that the variable i corresponds to sqrt(-1)
syms Or Oi real
subs(subs(AR_OMEGA, [i, omega] , [1i, Or+1i*Oi] ), [Or, Oi], [real(omega), imag(omega)] )
ans =
(4*(4*real(omega)^2 + (8*imag(omega) - 4)^2/16)^(1/2))/((64*real(omega)^2 + (8*imag(omega) - 1)^2)^(1/2)*(121*real(omega)^2 + (11*imag(omega) - 1)^2)^(3/2))

カテゴリ

Help Center および File ExchangeNumbers and Precision についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by