Can you help me please?
1 view (last 30 days)
Show older comments
Use the following set of pressure-volume data to develop a script m-file to find a0 and a1in the following exponential model.
y= ao + a1x +a2x^2
After the model development;
Calculate the root of developed model equation using Newton-Raphson method (xinitial=0). Then,
the code should automatically calculate the predicted volume @ 1.05 bar pressure using the regression model. Also, in the same script m-file this value must be calculated using Lagrange Interpolation and the absolute difference between two finding must be displayed as well.
Data: pressure(bar) volume(m^3)
0.644 32
0.985 25
1.108 22.2
1.363 18
1.631 15
1.934 12
2.356 9
3.1 7.2
The script m-file should work and all inputs must be defined in the beginning of the code.
The results should be presented with fprintfcommand.
The following results should be displayed at the end of the code in this order
a- the model, with a0 and a1 written on it
b- root of the model equation
c- result of the predicted volume at 1.05bar using regression model
d- interpolation result of volume at 1.05bar using lagrange method,
e- the absolute difference between the volume values calculated from model and interpolation.
When script executed above text with correct result should be displayed on command window:
a) The Model: y=(…………)+(…………)*x+(…………)*x^2
b) root value : ……………
c) From model: V=………… when P=1.05bar
d) According to LAGRANGE Method
f interpolated value for P = 1.05 -> V= …………
e) absolute difference between calculated value and interpolation
difference: …………
Answers (1)
Image Analyst
on 21 Jan 2022
That's not really an exponential model -- it's a polynomial model. Anyway, attached are some demos that may help you with your fitting.
6 Comments
Yakup Ardahan BAKIR
on 22 Jan 2022
Edited: Yakup Ardahan BAKIR
on 22 Jan 2022
so which one of the yFit is the answer for d? @Image Analyst
Image Analyst
on 22 Jan 2022
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!