%This is a demonstration script
%P. Chidyagwai
%2019/1/15
%MA 302

%declaration of an integer
myint =1

myint=myint+1

%declaration of a random scalar on (0,1)
disp('A random number between 0 and 1');
myrand_num = rand

%the constant pi to the default 4 decimal places
disp('4 digits of pi');
pi

%higher precision
format long
disp('15 digits of pi');
pi

% typing format reverts back to the default (short)
format
x=1;
% The following statement, without comment character, will 
% cause an error when executed.
bad=1/(x-1)


