How ask data to the user?

Hi all. I'm very new to matlab programming. I need to ask data to the user. How can I do?

2 Comments

KSSV
KSSV on 27 May 2019
What data?
Words. E.g. "What words do you prefere between house, work, chapel, laptop, skirt......?"

Sign in to comment.

Answers (1)

KSSV
KSSV on 27 May 2019
Read about input
prompt = 'Enter a value: ';
x = input(prompt)

3 Comments

Thank you so much! But it doesn't work with words..
prompt = 'Enter a string: ','s';
x = input(prompt)
Thank you so much!

Sign in to comment.

Categories

Asked:

on 27 May 2019

Commented:

on 27 May 2019

Community Treasure Hunt

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

Start Hunting!