4. GUI Unit Converter
With only a few modifications, the program above can be turned
into an interactive unit conversion tool. Copy and paste the code from the previous function
into a new function guiUnitConverter. Modify the position and string values of the text, edit,
and pushbutton objects to produce the results pictured below. Indicate what changes you
needed to make on the answer sheet.
inches =
Convert!
Then modify the code inside the callback function to produce the results pictured below after
the button is pushed. Note that in this case, you do not need to make the objects invisible
when the button is pushed. Also note that the str2num and num2str functions allow you to
convert back and forth between strings and numerical values for use in the 'String' property
of each object. After successfully executing and evaluating your GUI, write the new
statements that were added on the answer sheet.