problem, with an array
Hy, I'm working on an image processing project, and I have a big problem. I have an array, it have to be increased, if some statements are all true. But it is very slow. The whole code is 349 line long, and it work well, but if I add a line like this:
myarray(x,y)=myarray(x,y)+1;
Than it would be very very slow... But if I change the type of the array to uint32, run the code, break the progress and change back the array into double, than work it well. But only if I make this whole procedure manually... I don't want to do this all the time I run the program. myarray is created by:
myarray=zeros(24, 32, 'double');
Is anything wrong with it??? (sorry for my bad english, I'm hungarian)
I made a few printed screen of my running code's profile This is ig I just run it (it is slow)

If I change the type of the array into uint32 (this is slow too)

And this is if I change back thy type of the array into double again...: (and this is fast enough)

Please someone help me!
4 Comments
Accepted Answer
More Answers (0)
See Also
Categories
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!