From: Noah Snavely on
Hi everyone,

I'm running a large, non-linear optimization problem using lsqnonlin, and memory is becoming an issue. I'm passing in a sparsity pattern matrix as the JacobPattern, but for memory reasons I'd like to pass it as a sparse, logical matrix, rather than a sparse matrix of doubles (I can't think of any reason why a logical wouldn't suffice). However, lsqnonlin complains that:

"Invalid value for OPTIONS parameter JacobPattern: must be a matrix."

Is it possible to convince lsqnonlin to take in a logical matrix as the JacobPattern, or is there a reason why I shouldn't be trying this?

Thanks,
Noah