How to use look up table to calculate intersection?
Show older comments
Basically the intersection of two curves (dew curve & isenthalpic line in mollier diagram [T vs X if you will for this purpose]) shall be determined. Problem is, the dew curve contains a logarithm and vpasolve takes way too long for my simulation.
I received the tip to use a lookup table instead of the solver, but cannot make it work. I figured that fixpt_interp1(xdata,ydata,x,xdt,xscale,ydt,yscale,rndmeth) would be the right command, but fail to understand the meaning and influence of those inputs in the brackets.
My approach was to set xdata = linspace(0,0.2,1000), X in the range from 0 to 0.2 with 1000 steps & ydata = a*log(xdata)+b, T dependent of X (dew curve). For x (third input) I used the line that shall determine the intersection (isenthalpic line) in explicit form. Now, for the rest I have no idea what the are or do. I set xdt & ydt to sfix(8) [again no idea] and xscale & yscale to 2^-3. The results, however, were always the same, no matter the input for x.
Can you tell me if the lookup table is the best technique here, and where the problem is in my approach? Thanks in advance!
Answers (0)
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!