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.

 채택된 답변

Star Strider
Star Strider 2021년 3월 25일

0 개 추천

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
.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

태그

질문:

2021년 3월 25일

댓글:

2021년 3월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by