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 CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by