From: Meral on
Hello,
A comment about:
[x,fval,exitflag,output] = bintprog(f,A,B,Aeq,Beq,x0,options)

this function(depending on the test case) MIGHT return a sparsed x !!!!!!!

this causes segmentation errors and shuts down MATLAB if you try to process x as a normal array...etc.

All that you need to do is : full(x) before processing it.


cheers.
From: Steven Lord on

"Meral " <meral.shirazipour(a)gmail.com> wrote in message
news:honsi5$iri$1(a)fred.mathworks.com...
> Hello,
> A comment about:
> [x,fval,exitflag,output] = bintprog(f,A,B,Aeq,Beq,x0,options)
>
> this function(depending on the test case) MIGHT return a sparsed x !!!!!!!
>
> this causes segmentation errors and shuts down MATLAB if you try to
> process x as a normal array...etc.

It shouldn't, unless you're passing the x into a MEX-file that doesn't know
how to handle sparse matrices. If you're getting a segmentation violation
when you pass x into regular MATLAB code (no MEX involved) then please send
a simple example where you see this crash to Technical Support for
investigation.

--
Steve Lord
slord(a)mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ


From: Meral Shirazipour on
no MEX-file involved, regular MATLAB code gave segmentation errors. I already sent the error report to MATLAB.

regards.

"Steven Lord" <slord(a)mathworks.com> wrote in message <hoqd2f$ls5$1(a)fred.mathworks.com>...
>
> "Meral " <meral.shirazipour(a)gmail.com> wrote in message
> news:honsi5$iri$1(a)fred.mathworks.com...
> > Hello,
> > A comment about:
> > [x,fval,exitflag,output] = bintprog(f,A,B,Aeq,Beq,x0,options)
> >
> > this function(depending on the test case) MIGHT return a sparsed x !!!!!!!
> >
> > this causes segmentation errors and shuts down MATLAB if you try to
> > process x as a normal array...etc.
>
> It shouldn't, unless you're passing the x into a MEX-file that doesn't know
> how to handle sparse matrices. If you're getting a segmentation violation
> when you pass x into regular MATLAB code (no MEX involved) then please send
> a simple example where you see this crash to Technical Support for
> investigation.
>
> --
> Steve Lord
> slord(a)mathworks.com
> comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ
>