MATLAB: My answers are displayed in index form, how to remove this

for loopformat displayMATLABmatrices

This is the code;
j=1;
for i=0:0.1:5
K(j,:)=1023*(i/5);
j=j+1;
end
disp (K)
________________________
Output:
1.0e03*
0.0000
0.0205
0.0409
0.06138
And so on. How do I remove the answer in index form so that I will have
0.0000
20.4600
40.9200
61.3800 etc?

Best Answer

format longg
or
format shortg
should avoid displaying numbers in exponential form (this has nothing to do with indexes).