How to make MATLAB loop not use the same number?

1 Ansicht (letzte 30 Tage)
Rose Toto
Rose Toto am 11 Mär. 2023
Kommentiert: Walter Roberson am 16 Mär. 2023
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 Kommentare
Jan
Jan am 16 Mär. 2023
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 am 16 Mär. 2023
Jan, the OP is asking why you are saying that those particular lines in the function "sphere" are useless clutter.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by