フィルターのクリア

how do i get this to plot a graph

1 回表示 (過去 30 日間)
Carl Laarakker
Carl Laarakker 2021 年 4 月 12 日
コメント済み: Carl Laarakker 2021 年 4 月 12 日
close all
T= 1;
P = 4;
rs = 3.4;
lamda = 0.2;
Lss = .0011+(3/2)*.011;
rpm = 0;
wr = (P/2)*(2*pi*(rpm/60));
x = (lamda*rs)/((rs*rs)+(wr*wr)*(Lss*Lss));
new_VS = ((T*4/(x*3*P))+(wr*lamda))/sqrt(2);
total_vdc = 0;
N = 600 ;
while (rpm < N)
wr = (P/2)*(2*pi*(rpm/60));
x = (lamda*rs)/((rs*rs)+(wr*wr)*(Lss*Lss));
new_VS = ((T*4/(x*3*P))+(wr*lamda))/sqrt(2);
total_vdc = sqrt(2)*new_VS*2;
rpm = rpm + 1;
hold on
plot(rpm,total_vdc)
end
I can not seem to get this to plot. I only get blank graph. What am I doing wrong? Thank you in advance

採用された回答

David Fletcher
David Fletcher 2021 年 4 月 12 日
編集済み: David Fletcher 2021 年 4 月 12 日
You are trying to plot isolated unconnected points - they can't be joined with a line so the only way you can see them is to use a marker
plot(rpm,total_vdc,'+')
This will give you a graph (of sorts), but I doubt it is what you want.
Try this:
T= 1;
P = 4;
rs = 3.4;
lamda = 0.2;
Lss = .0011+(3/2)*.011;
rpm = 0;
wr = (P/2)*(2*pi*(rpm/60));
x = (lamda*rs)/((rs*rs)+(wr*wr)*(Lss*Lss));
new_VS = ((T*4/(x*3*P))+(wr*lamda))/sqrt(2);
total_vdc = 0;
N = 600 ;
iter=1;
while (rpm < N)
wr = (P/2)*(2*pi*(rpm/60));
x = (lamda*rs)/((rs*rs)+(wr*wr)*(Lss*Lss));
new_VS = ((T*4/(x*3*P))+(wr*lamda))/sqrt(2);
total_vdc(iter) = sqrt(2)*new_VS*2;
Y(iter) = rpm;
iter=iter+1;
rpm = rpm + 1;
end
plot(Y,total_vdc)
  1 件のコメント
Carl Laarakker
Carl Laarakker 2021 年 4 月 12 日
thats my result that appears to be right
THANK YOU!!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by