Q:

Write a script that will, in a loop, prompt the user for four course numbers. Each will be a string of length 5 of the form ‘CS101’. These strings are to be stored in a character matrix

0

Write a script that will, in a loop, prompt the user for four course numbers. Each will be a string of length 5 of the form ‘CS101’. These strings are to be stored in a character matrix. 

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Ch7Ex3.m

% Creates a character matrix with four course numbers

courses = [];

for i = 1:4

 courses = char(courses, ...

 input('Enter a course number: ','s'));

end

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now