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 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!