Write a script that will prompt the user for a string and then print whether it was empty or not
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:4| Question number:27.4
All Answers
total answers (1)
Ch4Ex27.m
instring = input('Enter a string: ', 's');
if isempty(instring)
fprintf('Not much of a string there!\n')
else
fprintf('Thanks!\n')
end
need an explanation for this answer? contact us directly to get an explanation for this answer