the variable appears to change size every loop iteration

3 ビュー (過去 30 日間)
Nisreen Aljumaili
Nisreen Aljumaili 2021 年 9 月 30 日
コメント済み: Nisreen Aljumaili 2021 年 9 月 30 日
clc
clear
If = [0 0.5 1.0 1.5 2.0 2.5];
Ea = [0 75 150 205 242 270];
Ra = 0.14;
RI = 2;
Ifield = linspace(0,2.5,100);
for n = 1:100
Ea_curve(n) = spline(If,Ea,lfield(n));
la(n) = Ea_curve(n)/2;
Vt(n) = Ea_curve(n)-la(n)*Ra;
Pload(n) = Ea_curve(n)"la(n)-la(n)^2*Ra";
end
plot(Ifield, Pload)
title ('Field current vs. Load Power')
xlabel('Field current [A]')
ylabel('Load power [W]')

回答 (1 件)

Alan Stevens
Alan Stevens 2021 年 9 月 30 日

カテゴリ

Help Center および File ExchangeEntering Commands についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by