5.3. Interactive Inputs
The following functions/commands can be used by the user for interactive input:
5.3.1. input Function
A user can input data by typing it at the keyboard by using input built-in function. The input function, when invoked, displays a prompt character string in the Command Window waiting for the user to feed the required data. Consider the following statement:
r = input('Enter radius in meters')
When executed, it displays the following character string on the monitor:
Enter radius in meters
It waits for the response of the user to provide the data from the keyboard. Here, it does not force the user to enter only numeric or character string. The user may enter any ...
Get MATLAB® and Its Applications in Engineering: [Based on MATLAB 7.5 (R2007b)] now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.