When I execute the following command to create a 2-by-1 sparse matrix from the columns of a null matrix ([]):
spdiags([], 0, 2,1)
I expect MATLAB to return an empty matrix, but I receive the following error message:
??? Index exceeds matrix dimensions. Error in ==> spdiags at 114 a((len(k)+1):len(k+1),:) = [i i+d(k) B(i+(m>=n)*d(k),k)];
Best Answer