필터 지우기
필터 지우기

solve the equation for a large frequency range

조회 수: 5 (최근 30일)
Tasin Nusrat
Tasin Nusrat 2021년 9월 26일
댓글: Tasin Nusrat 2021년 9월 26일
I want to solve the below equation for the frequency range of 1Khz to 100MHz.
the equation is factor=Rsh/(Rsh+j*2*pi*frequency*Lsh)
here,
Rsh=0.01*pi
and
Lsh=5*10^-9
. But when I run the code it shows matrix mismatch
freq=1e+3:1e+8;%frequency range
Rsh=0.01*pi;
d=Rsh+(2*pi*freq*i*5*10^-9);
factor=Rsh/d;

답변 (1개)

Walter Roberson
Walter Roberson 2021년 9월 26일
Rsh=0.01*pi
Rsh = 0.0314
Lsh=5*10^-9
Lsh = 5.0000e-09
freq=1e+3:1e+8;%frequency range
Rsh=0.01*pi;
d=Rsh+(2*pi*freq*i*5*10^-9);
factor = Rsh ./ d;
In MATLAB, the / operator is "matrix right divide". Rsh/d is roughly equivalent to Rsh * pinv(d) but with some restrictions about the sizes; the * indicated here is algebraic matrix multiplication, "inner product".
What you wanted was element-by-element division, which in MATLAB is the ./ operator.
  댓글 수: 3
Walter Roberson
Walter Roberson 2021년 9월 26일
Rsh=0.01*pi
Lsh=5*10^-9
freq=1e+3:1e+8;%frequency range
Rsh=0.01*pi;
d=Rsh+(2*pi*freq*i*5*10^-9);
factor = Rsh ./ d;
b = 2 .* pi .* 3.5e-12 .* i .* factor .* freq;
Note: if i is intended to represent the imaginary constant, then
b = 3.5e-12i .* 2 .* pi .* factor .* freq;
Tasin Nusrat
Tasin Nusrat 2021년 9월 26일
Thanks a lot

댓글을 달려면 로그인하십시오.

카테고리

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