Question: % ( a ) Create a string array called names with five different names. % For the purposes of this exercise choose the following names:

%(a) Create a string array called names with five different names.
% For the purposes of this exercise choose the following names:
% Jose Pieter Heidi Xian Sara
names =["Jose","Pieter","Heidi","Xian","Sara"]'
%(b) Create a two-dimensional numeric array called birthdays to represent the birthday
% of each person using the following data.
% These dates are ordered as month, day, year.
birthdays =[6,11,1993; % June 11,1993
3,11,1995; % March 11,1995
6,29,1996; % June 29,1996
12,12,1994; % December 12,1994
12,11,1997]; % December 11,1997
%(c) Use the sprintf function to create and display a combined list of names and birthdays.
% Name your list, friends.
friends = strings(size(names)); % Initialize a string array for the output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!