# help with format +

2 messages
Open this post in threaded view
|

## help with format +

 Could someone try the following code under Matlab? x = ones (3,3); x(2,2) = 0; x([1, 3], [3, 1]) = -1; format + x sx = sparse (x) Thanks, Rik ----------------------------------------- Join us March 12-15 at CERN near Geneva Switzerland for OctConf 2018.  More info: https://wiki.octave.org/OctConf_2018-----------------------------------------
Open this post in threaded view
|

## Re: help with format +

 Rik-4 wrote > Could someone try the following code under Matlab? > > x = ones (3,3); > x(2,2) = 0; > x([1, 3], [3, 1]) = -1; > format + > x > sx = sparse (x) r2018a prerelease (copied in one time into terminal so consecutive answers, but clear enough): >> format compact >> x = ones (3,3); x(2,2) = 0; x([1, 3], [3, 1]) = -1; format + x sx = sparse (x) x = -+- + + -+- sx =    (1,1)   -    (2,1)   +    (3,1)   -    (1,2)   +    (3,2)   +    (1,3)   -    (2,3)   +    (3,3)   - Philip -- Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html----------------------------------------- Join us March 12-15 at CERN near Geneva Switzerland for OctConf 2018.  More info: https://wiki.octave.org/OctConf_2018-----------------------------------------