Addition of specified array indexes in simulink

1 visualización (últimos 30 días)
ricard molins
ricard molins el 11 de Dic. de 2018
Respondida: madhan ravi el 11 de Dic. de 2018
I am having some problems whentrying to achieve what seems to be a simple for loop with simulink. The loop I want to acheive is something like:
% INPUTS
myArray = [1,2,3,4,3,2,3,4,5,6,7] % example
startIndex = 3
endIndex = 5
% Actual loop
total = 0
for c = startIndex:1:endIndex
total += myArray(c)
end
Any guidance on how could this behaviour be achieved in simulink?

Respuesta aceptada

madhan ravi
madhan ravi el 11 de Dic. de 2018

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by