0
Fixed

Output of disp

Stefan Güttel vor 9 Jahren aktualisiert von Pavel Holoborodko vor 9 Jahren 3
Hi Pavel,

we have observed the following "bug" (or rather inconsistency) in the formatting of the output via DISP:

Standard MATLAB code with output:
>> disp(1)
1
MP version:
>> disp(mp(1))
x =
1
There should be no x. As mp(1) pruduces no "x =", the bug must be in disp.
Another inconsistency with MATLAB output formatting concerns format compact. One would expect a reduced amount of space when it is turned on, which appears not to be the case with mp.
>> format compact
>> 1
ans =
1
>> disp(1)
1
>> mp(1)
ans =
1
>> disp(mp(1))
x =
1
Cheers,
Mario Berljafa & Stefan Guettel

Hi Guys,

Nice catch!

As for disp - it is funny and easy to fix right away.
Just replace display(x) with disp(mpimpl(2,x,inputname(1))); in disp(x) function in mp.m file (line #903)

As for compact - need to implement its support in C++. Have been thinking about this, but was waiting until somebody asks. I guess time has come :).

Both issues will be resolved in next version.

Thank you,
Pavel.
Thanks Pavel, that was quick as usual :-) We'll download the next version, test it, and let you know should there be any problems.

Regards, Stefan
Fixed
Dear Stefan,

Please download & test the newest version of toolbox.
Now it honors "format compact/loose" among other things.

Would appreciate any further feedback.