I implement this cod but i have problem when run the code with high size of image and the program hung.
"The problem reported as:The size of the indicated variable or array appears to be changing with each loop iteration. Commonly, this message appears because an array is growing by assignment or concatenation. Growing an array by assignment or concatenation can be expensive. For large arrays, MATLAB must allocate a new block of memory and copy the older array contents to the new array as it makes each assignment. Programs that change a variable's size in this way can spend most of their run time in this inefficient activity.
For the same reasons, there is significant overhead in shrinking an array or in changing the size of a variable on each iteration. "
The code of logistic map:
function [z] =logistic(r,size)
x(i+1) = r*x(i)*(1-x(i));