필터 지우기
필터 지우기

GA optimasation error during the running , the subcript indices must be integer positive or logical?

조회 수: 2 (최근 30일)
i define my fiteness function for the GA using 'assignin' expression
function [y]=myfiteness(x)
assignin('base','na',x(1));
assignin('base','nb',x(2));
[~,~,Y]=sim('mymodel',[0,1]);
y=y(end,2);
after using otimtool for GA for the function , the running stops and a message apear in the running section of the optimtool which show the following ''the subcript indices must be integer positive or logical''
so how to solve this problem????????
  댓글 수: 3
khelifa siham
khelifa siham 2022년 5월 8일
thank you sir for your observation but in fact the variable is y, not Y as i wrote before, i made the mistake of writting while i was posting the question ,so there is variable to work with in the simulation.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Performance and Memory에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by