Problem with Matlab solver

1 回表示 (過去 30 日間)
The Name
The Name 2017 年 2 月 2 日
回答済み: Carlos Felipe Rengifo 2018 年 7 月 6 日
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
Carlos Felipe Rengifo 2018 年 7 月 6 日
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 Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by