Getting a single solution, but expecting an array

Total newbie, here is my relevant code:
s=0.001:0.10:1.001;
Z_in = (r_s + j*L_ls) + (j*L_m*(r_r./s + j*L_lr))/(j*L_m + r_r./s + j*L_lr)
All variables are entered as single values except for s, which varies as shown. I am only getting a single solution for Z_in, but I'm expecting a range of values. What am I missing here? I deleted the last expression in parentheses just to see what would happen, and I get an array solution. But as shown, Matlab returns just a single value.

 Respuesta aceptada

Star Strider
Star Strider el 25 de Mzo. de 2021
Missed one element-wise division:
Z_in = (r_s + j*L_ls) + (j*L_m*(r_r./s + j*L_lr))./(j*L_m + r_r./s + j*L_lr)
↑ ← HERE
.

2 comentarios

Ryan Glover
Ryan Glover el 25 de Mzo. de 2021
Thank you!
Star Strider
Star Strider el 26 de Mzo. de 2021
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 25 de Mzo. de 2021

Comentada:

el 26 de Mzo. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by