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 CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by