clc clear all %% A program showing use of strings disp('Uses of Strings') % Uses of strings in programming % Strings are defined by single quotes %% EXAMPLE disp(' Example 2') %variable "e" contains the stirng e ='I have '; %f is a variable containing number f =3; %fs is variable containing string %num2str is command that changes number to a string fs=num2str(f); g =' cats'; % h is a string which contains the concatenated(combined) string h =[e,fs,g]; fprintf(' %s\n',h)