Exercise 6.5: Input

Make a script file `date.m' with which the user can call up de desired date.

How to solve the problem
Ask the user (with the command >> input if he/she wants to know the date (1=yes, 2=no).
If the answer is `yes' the date must be displayed (>> date).
If the answer is `no' display on the screen that the user does not want to know the date (>> disp)
Write the m-file in MATLAB.
Test the script file and, if necessary, debug the file.

Previous      Next      Up      Answer

Esteur 2010-03-22