Write a getString() function that prompts the user for a string and returns it

5 views (last 30 days)
Call getString() function to get the string from the user. I can't get the string from the function.
function getstring()
input('Enter A String: ','s');
end

Accepted Answer

KSSV
KSSV on 1 Dec 2016
function str = getstring()
str = input('Enter A String: ','s');
end
  3 Comments

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Tags

No tags entered yet.

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!