Ashley P.

asked • 11/07/22

Keyboard Inputs in MATLAB 2015a Version

Hi!

I'm trying to do the following using MATLAB 2015a version


Add a keyboard input for a user to input any number and displays it as follows:


The code I wrote is as follows:

x=input('Enter a number: ');

printf(Entered number is: ', x);


And an error is displayed as below regarding the 2nd code line

Undefined function 'printf' for input arguments of type 'char'.



How can I correct this?

1 Expert Answer

By:

Kirk B. answered • 01/17/23

Tutor
4.8 (20)

BME PhD candidate with 6+ years MATLAB experience

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.