Hi, I am new to Matlab, i have more experience with C/C++
I am trying run this simple loop:
x=zeros([10001,10001,2]);for t=1:2for z =1:10000for i =1:10000 x(z,i,t)=i+z+t+2;end endendx(5,5,1)
But is taking a while..imagine many of then inside a single algorithm. in C++ this loop runs in a few seconds…
Is there any other way to run this loop in Matlab faster???
Sorry if my question is silly, first time running Matlab. I tried some vectorization but for nested loops things get really complicated, especially with different loop sizes.
Thanks
Best Answer