Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the following set of pressure-volume data to develop a script m-file to find a 0 and a 1 in the following exponential model. P.S

Use the following set of pressure-volume data to develop a script m-file to find a0 and a1 in the following exponential model.

P.S I NEED I SCRIPT FOR MATHLAB!!

y=a0+a1x+a2x2

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 (m3)

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

Note: The script m-file should work itself when I run it! I will not make any additional inputs. All inputs must be defined in the beginning of the code.

Please note the following warnings!

The results should be presented with fprintf command.

The following results should be displayed at the end of the code in this order (just these. No more!): 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:

image text in transcribed

image text in transcribed

NUMERICAL ANALYSIS TUTORIAL EXAM Use the following set of pressure-volume data to develop a script m-file (name it as your "name. sumame) to find an and a in the following exponential model. y = a, + ax + a,x After the model development: Calculate the root of developed model equation using Newton-Raphson method (Sinitial=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 Volume (bar) (m) 0.644 32 0.985 25 1.108 1.363 18 1.631 15 1.934 12 2.356 9 3.1 7.2 22.2 Note: The script m-file should work itself when I run it! I will not make any additional inputs. All inputs must be defined in the beginning of the code. Please note the following warnings! The results should be presented with fprintf command. The following results should be displayed at the end of the code in this order (just these. No more!): a- the model, with ao and ai 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 GOOD LUCK NUMERICAL ANALYSIS TUTORIAL EXAM ANSWER When script executed above text with correct result should be displayed on command window: a) The Model: y=(............) + (...........) *x+ (............) *x^2 b) root value : BREREREBRER 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: BELERE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Temporal Databases Research And Practice Lncs 1399

Authors: Opher Etzion ,Sushil Jajodia ,Suryanarayana Sripada

1st Edition

3540645195, 978-3540645191

Students also viewed these Databases questions

Question

Question What is a Roth 401(k) feature?

Answered: 1 week ago

Question

Question Can employees make contributions to a profit sharing plan?

Answered: 1 week ago