vector display

18 Ansichten (letzte 30 Tage)
A
A am 20 Mai 2011
when i use disp(im), where im is image vector after PCA, I get output as: 1.0e+003 *
1.234 -0.964 ....
what is 1.0e+003 * in the beginning??

Akzeptierte Antwort

Arnaud Miege
Arnaud Miege am 20 Mai 2011
Have a look at the format function, for example try:
format short g
disp(im)
HTH,
Arnaud

Weitere Antworten (1)

Jan
Jan am 20 Mai 2011
DISP tries to be smart and occupy as small space in the command window as possible. If all the data have a magnitude far appart from 1.0, DISP rescales the values and shows the scaling factor on top of the values. Possible solutions:
format long g
or
fprintf([repmat('%g ', 1, size(im, 2)), '\n'], transpose(im));

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by