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

Community Treasure Hunt

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

Start Hunting!

Translated by