Borrar filtros
Borrar filtros

solve the equation for a large frequency range

2 visualizaciones (últimos 30 días)
Tasin Nusrat
Tasin Nusrat el 26 de Sept. de 2021
Comentada: Tasin Nusrat el 26 de Sept. de 2021
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;

Respuestas (1)

Walter Roberson
Walter Roberson el 26 de Sept. de 2021
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 comentarios
Walter Roberson
Walter Roberson el 26 de Sept. de 2021
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 el 26 de Sept. de 2021
Thanks a lot

Iniciar sesión para comentar.

Categorías

Más información sobre Mathematics en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by