For ... Next Loops
조회 수: 5 (최근 30일)
이전 댓글 표시
The problem
I would like to use xlsread to define inputs to a function - I have many combinations of inputs to contend
with (5000) and feel it would be easier to control via the use of an Excel Spreadsheet (rather than hard
coding in matlab)
However some of the inputs my be defined as say a = single doubles, b = loop from min:step:max, and
and c = series [low mid high] or even textual array. These would have to then form nested loops to step
over all combinations. Is there a method i can use within matlab m file to control how to configure to loops
I could loop round all the inputs in the xls sheet (accessed via xlsread) doing a checks to determine
which format the input may take and hence forming a nested loop
for loop1=a
for loop2=b
for loop3=c
DoFunc = func(loop1, loop2, loop3)
end
end
end
but given I may have 50 variables I do not really want 50 nested loops
Any suggestions of a elegant method (or alternatives) I could employ
Thank You
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Downloads에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!