Contents

clc
clear all

IDENTIFICATION

Name: Autar Kaw (Put your name here) Section : 001 (Put Section here) Semester: Fall 2011 Due Date & Time: August 29, 2011 (Put due data and time here)

disp('Name: Autar Kaw (Put your name here)')
disp('Section : 001 (Put Section here)')
disp('Semester: Fall 2011')
disp('Due Date & Time: August 29, 2011 (Put due data and time here)')
Name: Autar Kaw (Put your name here)
Section : 001 (Put Section here)
Semester: Fall 2011
Due Date & Time: August 29, 2011 (Put due data and time here)

BACKGROUND and DESCRIPTION

Title: Sample program to show how to use strings and how to combine two or more strings into a single string

disp('This program teaches how to use strings and concatenate them')
This program teaches how to use strings and concatenate them

INPUTS

% First string
a='My name ';
% Second string
b='is Slim Shady';

CODE

Join strings a and b together to form a new string, c

c=[a,b];

OUTPUT

Now to display the string note the "s" is for string format

fprintf('  %s\n\n',c)
  My name is Slim Shady