Simple for loop in Simulink
조회 수: 1(최근 30일)
표시 이전 댓글
Hello,
I have a R matrix whose dimension is Nx3. N will be given by user. How can I implement following Matlab code in simulink without using Matlab function block? I want to use for loop.
R=zeros(N,3)
dR=zeros(N-1,3)
for i=1:1:N-1
dR(i,:)=R(i+1,:)-R(i,:)
end
%% THANKS
댓글 수: 0
답변(1개)
Abhishek Gupta
2021년 4월 12일
Hi,
You can use a For Iterator Subsystem block. Referring to the following documentation, which might help you achieve the mentioned task: -
댓글 수: 0
참고 항목
범주
Find more on Simulink Functions in Help Center and File Exchange
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!