MATLAB DOES NOT CALCULATE THE ABSOLUTE VALUE
1 view (last 30 days)
Show older comments
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 )
0 Comments
Answers (1)
Walter Roberson
on 29 Nov 2020
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))
0 Comments
See Also
Categories
Find more on Numbers and Precision in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!