% other than using the colon like start:step:last to generate 
% a (row) vector of numbers, the function 
% linspace(start, last, numberPoints) can be used to create a (row) vector
% containing points starting with the variable start and ending with
% the varibable last.
% The total number of points generated is given by the variable
% numberPoints.
% For linspace, the step size is not specified explicitly by the user.
% MATLAB computes its value so that the number of points generated is
% exactly right.
% Recall that in start:step:last, the last point may not be given by 
% the variable last.
% Example:
start = 3; last = 99; Vec = linspace(start,last,12)
% another example:
start = 3; last = 9; Vec = linspace(start,last,4)

% A function called repmat can be used to repeat a matrix in a specified
% pattern to create larger matrices.
% The usage of this function is:
% repmat(MATRIX,nRows,mColumns)
% where MATRIX is the matrix to be replicated,
% nRows is the number of rows and
% mColumns is the number of columns to duplicate this matrix.
% Example:
REP = repmat(Vec,2,3)


% Function to convert numbers to strings: num2str
% Usage: to display strings along with numbers, the number must be first
% converted into strings and then concaternated with the other strings to
% be displayed.
% Example:
age = 23; stringVar = num2str(age)
whos
% when the variable stringVar is displayed, its content looks like 
% the variable age.
% But looks can be deceiving!
% Variable stringVar is a string but age is a double precision number.
% You can use whos to see the difference.
% You can also see the differences when you use these variable to do 
% any omputation. Strings are converted into an array of numbers,
% using the ASCII values of the corresponding characters in the string to
% do calculations.
% Example:
2*age
2*stringVar
% Example to display string and numeric data together:
Name = 'Palin';
[Name age]
[Name num2str(age)]
% Notice that if you want a space separating the 2 pieces of data,
% you need to put it in yourself:
[Name ' ' num2str(age)]
