How to make MATLAB loop not use the same number?

5 views (last 30 days)
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 Comments
Jan
Jan on 16 Mar 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 on 16 Mar 2023
Jan, the OP is asking why you are saying that those particular lines in the function "sphere" are useless clutter.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!