The following code seems really slow, which I do allocating a matrix and then write some complex numbers in it:
tic,for kk = 1:1000
aa = (zeros(10000,500)); aa(:,300) = 1i * 3;
The code is really slow:
Elapsed time is 42.463659 seconds.
Is there any way to accerlate this?