How to make MATLAB loop not use the same number?

조회 수: 5 (최근 30일)
Rose Toto
Rose Toto 2023년 3월 11일
댓글: Walter Roberson 2023년 3월 16일
i ask about matlab give me the same bus , i want location be for example 2,19,25
N=50; % Number of search agents
Max_iter=100; % Maximum number of iterations
lb=[2 975 2 975 2 975 ];
ub=[33 975 33 975 33 975 ];
dim=6;
fobj= @(x) Sphere(x);
but it give me loc 2 2 2
X_opt_loc =
2 2 2
X_opt_size =
975 975 975
I would be glad to give me solution for my problem.
  댓글 수: 37
Jan
Jan 2023년 3월 16일
Sorry, as long as I cannot guess what "those lines on sphere" means, I'm out of this discussion, because I cannot understand the problem.
Walter Roberson
Walter Roberson 2023년 3월 16일
Jan, the OP is asking why you are saying that those particular lines in the function "sphere" are useless clutter.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by