clc format compact format long e step=.2 x1=2.6 x1=x1+step x1=x1+step x1=x1+step x1=x1+step x1=x1+step x1=x1+step x1=x1+step x1=x1+step % A list of numbers from .2 to 4 y=[1:20] x1=step*y % The same list using different commands x2=[step:step:20*step] % The same list using a third set of commands y=ones(1,20) y=step*y x3=cumsum(y) %%% All three displayed simultaneously as columns [x1;x2;x3]' %% Causing bigger problems y=ones(1,200); y=step/10*y; x4=cumsum(y); [x3;x4(10:10:end)]' % A look at the hex format for x3 format hex [x3;x4(10:10:end)]' %%% Other floating point issues format long e [eps, realmin, realmax] % Here's a list of the first 50 factorials format long g n=1:200; factorials=cumprod(n); A=[n;factorials]'; A(1:3:end,:) % Calculating e terms = [1, 1./factorials]; approximations=cumsum(terms); n=[0:length(terms)-1]; B=[n;approximations]'; B(1:20,:)