0
|
6027 Views
|
3 Replies
|
1 Total Likes
View groups...
Share

# How can I write a simple program to give several outputs for 2 inputs?

Posted 11 years ago
 Hi, I am totally new to mathematica and program-writing in general. I need to write a program that calculates psychrometric properties from given inputs (dew point, humidity, etc. from pressure, dry/wet bulb temperature). I have the formulas that relate these different variables, but I've never written a program before. The program must be compatible with matlab when it is completed. If anyone could suggest how to start this or any good websites or tutorials on how to do this kind of program I would really appreciate it. Thanks a ton!
3 Replies
Sort By:
Posted 11 years ago
Posted 11 years ago
 Well just going through some of the demonstrations, I see it is quite simple to enter a function and a range of variables and use Manipulate to create an interactive app with a slider to show the outputs on a graph. I would like my final product to be similar. I have several functions to solve for variables sequentially given 3 independent variables (namely, dry and wet bulb temperatures and atmospheric pressure to give Dew point temperature, humidity, vapor pressure, enthalpy, etc.). Generally, I think it would look like this: starting variables are x, y, z. f(x) and f(y) give variables a and b to be plugged into the next equation relating all three such as g(a,b,z)=w which is humidity. w is then used in the next equation to give another output and so on. I envision a program where I can enter these values of x, y, and z and be given the outputs that follow. Function 2 of the online calculator found at http://www.psychrometric-calculator.com/HumidAirWeb.aspx is basically what I want it to do. I could probably do these calculations easily using a simple excel spreadsheet, but my instructor wants a simple user-friendly interface using Labview or Matlab. I know very little about Labview, matlab, or mathematica, but when I came along mathematica it seemed like something I could do this on and also learn to do some very powerful calculations as I became more familiar with it. Any advice in the right direction would be much appreciated! Thanks!It looks like someone has put in something like this already in wolframalpha as well: http://www.wolframalpha.com/input/?i=psychrometric+properties
Posted 11 years ago
Community posts can be styled and formatted using the Markdown syntax.