Hi Maurilio,
I was able to reproduce the error using the code you provided. After analysing your code, I noticed that the cell array 'ED' changes its shape in each iteration (line 32).
You can confirm this by removing the semicolon at the end of line 32.
It's important to note that not all MATLAB codes can be converted into C code using the MATLAB Coder. Since C does not support variable-size arrays, the variable size of 'ED' cannot be converted from MATLAB to C.
One possible workaround is to use padding. You can add extra zeros at the end of the arrays to fix their size. Preallocate the size for the arrays by creating an array of zeros or ones and avoid changing their size within the loop.