Problem with Matlab solver

1 次查看(过去 30 天)
The Name
The Name 2017-2-2
I have the following expression (transfer function):
H(w) = 0.1/(1 - 0.9exp(-jw))
where w is a symbolic variable (omega).
I'm trying to solve the following expression for w:
|H(w)| == 1/sqrt(2)
Solving this by hand I believe the answer should be 0.105, but I cannot get this answer. I've tried adding assumptions for w is real and w>0
I've tried the following commands:
solve(abs(H)==1/sqrt(2),w)
and
solve(H^2==1/2,w)
With no luck. Any assistance would be greatly appreciated.
Thanks!

回答(1 个)

Carlos Felipe Rengifo
Hi, You can solve the equation without using symbolic math. The answer can be find in a numerical way:
H = @(w) 0.1/(1 - 0.9*exp(-1i*w));
F = @(w) (abs(H(w))-1/sqrt(2))^2;
Wo = fminbnd(F,0,pi);
As the function H has a period of two times pi, there are infinite solutions: Wo+2*pi, Wo+4*pi, ....
If you really need to use symbolic math, the following sentences give the right solution in Matlab '9.4.0.885841 (R2018a) Update 3'
syms w real;
H = 0.1/(1 - 0.9*exp(-1i*w));
Sol = double(solve(H'*H == 1/2,w));
Sol(Sol < 0) = [];

类别

Help CenterFile Exchange 中查找有关 Mathematics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by