Preallocating a variable that changes size every for loop iterations.

1 view (last 30 days)
I am using a variable indices that changes size like three times in an iteration .Preallocating it does not change anything.
  1 Comment
Heg Vel
Heg Vel on 25 Sep 2020
When I run the code it says the variable needs prealloaction.I am bulding masks here that will help me like constraints in a GA code.

Sign in to comment.

Answers (1)

Sindar
Sindar on 25 Sep 2020
It's just a code suggestion, you can safely ignore it.
  3 Comments
Sindar
Sindar on 25 Sep 2020
That's an entirely separate issue. If you want help on that, create a new question with the relevant code as a code block (not an image)

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!