Friday, 13 September 2013

How to improve performance in matlab operation with 3 for loops?

How to improve performance in matlab operation with 3 for loops?

I'm trying to improve the speed of the following code calculation:
for i=1:5440
for j=1:46
for k= 1:2
pol(i,j,k)= kr0*exp(0.8*k*0.1)*(abs((I(i)*exp(-0.1*j*2.5))^0.9)+0.0);
end
end
end
Where I is a vector with 5440 values.
Is there any way to avoid the three for loops and increase the speed of
this operation?. I can't find a right solution.
Thanks

No comments:

Post a Comment