USF Simple Graphical User Interface Using Matlab Problem

Graphical User InterfaceGoal
To gain familiarity with the Matlab Graphical User Interface (GUI) by:
• Creating a simple GUI to interpolate Thermodynamics tables.
Submission guidelines
Upload a zip file (compressed file, .zip extension) containing the GUI function .m file and the
GUI figure .fig file. Both files should have the same name. The difference is the extension: .m
and .fig
Key functions
handles
guidata(hObject,handles)
callback functions
str2double loops
if statements
Problem to be solved
1
For a given temperature, we can obtain other properties such as enthalpy (h), relative pressure
(Pr) or relative volume (Vr). Similarly, given a different property, such as enthalpy, we can also
obtain the other properties that go along with such enthalpy. The problem arises when we need to
look up properties for a temperature (or any other property) that is not directly given in our table.
For instance, if my temperature is 326.3 K, what is the value of the other properties for such
temperature? Or if my relative pressure (Pr) is 1.185, what is the value of the other properties
corresponding to such Pr?
In these cases, we need to interpolate. The primary objective of your GUI will be to perform such
interpolation for you given the value of one of the properties.
Interpolation equation
Let’s think general. Imagine we know a variable with a value of x, which falls between values x1
and x2 given in the table. For such value of x, we need to find the value y of another variable.
Figure 2 summarizes this idea in a graphical way.
2
Basic design of GUI
This projects admits flexibility with the GUI design. At the very least, it should present the
components shown in Figure 3.
3
T
h
Pr
Eng. Units
Vr
Clear
Figure 3. Basic GUI design. It contains 4 text boxes for temperature (T), enthalpy (h), relative
pressure (Pr) and relative volume (Vr). Also, a units radio button and a clear push button.
Your GUI must at least contain:



4 text boxes for temperature (T), enthalpy (h), relative pressure (Pr) and relative
volume (Vr).
A units radio button. The default units will be SI units. By clicking in the radio button,
the user can interpolate values in the English units table.
A clear push button that will erase all text boxes.
NOTE: the units radio button is not a units conversion button. It does not convert units. It is
simply a way to choose which table you want to work with, either the one with SI units or the
one with English units.
The way the GUI should work
Once completed, the way the GUI should operate is as follows: the user types in a value for one
any of the 4 properties (temperature, enthalpy, relative pressure or relative volume) in the
respective text box and when it hits enter, the rest of the text boxes should populate with the
proper interpolated values for those properties.
If the user enters a value that is out range, the GUI does not have to do anything. If it causes an
error, it is okay, it is the user’s fault. The user can simply press CLEAR in the GUI and enter a
proper value next time.
4
When the user clicks on the CLEAR button, it should erase the content of all 4 text boxes at
once.
When the user wants to work with the English units table, it should select the radio button and
then enter a property value in the corresponding text box. You can use the SI units table as the
default one.
Table range
You do not need to type in the whole A-17 and A-17E tables into Matlab. You can limit yourself
to the range of values shown in Figure 1. Keep in mind the only variables required for this GUI
are temperature, enthalpy, relative pressure and relative volume. You can ignore the rest.
You will have to manually enter the values for such properties in your script. You can do so by
creating two matrices: one for table A-17 and another for table A-17E. You can define these
matrices in the Opening function (OpeningFcn) of your GUI script.
5

Calculate your order
275 words
Total price: $0.00

Top-quality papers guaranteed

54

100% original papers

We sell only unique pieces of writing completed according to your demands.

54

Confidential service

We use security encryption to keep your personal data protected.

54

Money-back guarantee

We can give your money back if something goes wrong with your order.

Enjoy the free features we offer to everyone

  1. Title page

    Get a free title page formatted according to the specifics of your particular style.

  2. Custom formatting

    Request us to use APA, MLA, Harvard, Chicago, or any other style for your essay.

  3. Bibliography page

    Don’t pay extra for a list of references that perfectly fits your academic needs.

  4. 24/7 support assistance

    Ask us a question anytime you need to—we don’t charge extra for supporting you!

Calculate how much your essay costs

Type of paper
Academic level
Deadline
550 words

How to place an order

  • Choose the number of pages, your academic level, and deadline
  • Push the orange button
  • Give instructions for your paper
  • Pay with PayPal or a credit card
  • Track the progress of your order
  • Approve and enjoy your custom paper

Ask experts to write you a cheap essay of excellent quality

Place an order