Hi everyone,
I am a bit lost,
I ran a code this morning and the pre allocation do not work, it changes the size of my matrices with any reason,
So I did a small try like this :
n=3
x = zeros(1,n);
for ii=1:10
x( ii ) = ( ii );
end
Before I got an error because the size just exceeds... now it works, it changes the size of x, how to avoid that ?
Best regards,
1 Comment
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/503342-pre-allocation-do-not-work#comment_792962
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/503342-pre-allocation-do-not-work#comment_792962
Sign in to comment.