필터 지우기
필터 지우기

Addition of specified array indexes in simulink

조회 수: 2 (최근 30일)
ricard molins
ricard molins 2018년 12월 11일
답변: madhan ravi 2018년 12월 11일
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?

채택된 답변

madhan ravi
madhan ravi 2018년 12월 11일

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by