Simple for loop in Simulink
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (1)
Abhishek Gupta
le 12 Avr 2021
Hi,
You can use a For Iterator Subsystem block. Referring to the following documentation, which might help you achieve the mentioned task: -
0 commentaires
Voir également
Catégories
En savoir plus sur Simulink Functions dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!