Matlab command window output of matrix values does not match output in file -


i have large matrix , want check on screen before continue use it. now, when displaying it, values wrong (off factor of 100), when print them file fine. (and here have loved post picture of this, don't have enough reputation...) here's code:

disp(bigmatrix) %does not work way expected  = 1:size(bigmatrix, 1)                     %from here     j = 1:size(bigmatrix, 2)                 %         fprintf(fileone, '%f', bigmatrix(i,j));  %         fprintf(fileone, '\t');                  %     end                                          %     fprintf(fileone, '\r\n');                    % end                                              %here perfect 

so, in file have 1 @ end of each column disp() function (or typing name of matrix) gives me 0.0010. other values wrong well, might formatting issue. ideas what's going on?

it formatting issue: because matrix big, couldn't scroll beginning matlab's standard format

format short 

declared result

bigmatrix =               1.0e+03 *                [...bigmatrix...] 

so values looked wrong @ bottom although weren't. changing format to

format short g 

does trick.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -