Professional Documents
Culture Documents
• for loops
Relational Operators
Display
When writing programmed and scripts, it is important to see a visual
confirmation of input or output data. In order to see just that we use
the disp() function.
The disp() function can only read one type of data at a time (e.g
numbers, strings,etc.) so it is best to convert the data type to a single
type when using the function.
To facilitate, the num2str() function converts number data to string
data.
Example
• T = [ 15 50];
• disp([‘The time is: ’ num2str(T)])
if