Info

This question is closed. Reopen it to edit or answer.

How do I show the variables the users' inputted in a disp or fprintf fucntion?

1 view (last 30 days)
I'm kind of new to MATLAB, how can I show the users' inputted data on a disp or fprintf function?
  4 Comments

Answers (1)

KSSV
KSSV on 13 Sep 2020
Edited: KSSV on 13 Sep 2020
prompt = "Hey user, input a number: ";
num = input(prompt) ;
fprintf("User, you have entered %f\n",num)

This question is closed.

Community Treasure Hunt

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

Start Hunting!