I'm trying to have limitation over the columns of a matrix. The limits are set automatically during running the code and the values of limits are indices of columns. Some times the value of the limits are [] and when I run the following code I get this error:Index exceeds array bounds.
here is the code:NewPrime_CO=NewPrime_CO(: , [1:limit1(1)-1 limit1(end)+1:limit2(1) limit2(end)+1:end]);
I can't find out what to do to solve it. Thanks in advance
Best Answer