for loop in simulaink as matlab function

1 回表示 (過去 30 日間)
vishnuvardhan naidu tanga
vishnuvardhan naidu tanga 2019 年 12 月 11 日
Is there any way to use this code as a matlab function in simulink?
P=zeros(0,n+1);
P(1) = P_in;
CR = (P_out/P_in)^(1/(n));
for i = 2:n
P(i) = CR*P(i-1);
P(i+1) = CR*P(i);
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by