Question: Computer Science - MATLAB Project Given in the data file (exponential.dat), where the first column is the y values and the second column
Computer Science - MATLAB Project

Given in the data file (exponential.dat), where the first column is the "y" values and the second column is the "x" values .

Using the data in the dat file, calculate the values of the constants a and b in the given exponential function(Eq 1) using the least squares polynomial.
Calculate the time dependent Ordinary Differential Equation based on the data obtained.
dx(t)/dt = [ 1,9 - y(t) - x(t)*13,9 ] * 1,04 ODE equation;
For the time interval t [0, 800] ms using the step sizes t = 40 ms and assume that y(0) = 0 for t = 0 s;
Write the MATLAB code that solves the ODE with the Euler Method and find the values of x(t) and y(t). Plots of x(t) and y(t) versus time t. ( The least squares approximation operation must also be inside the MATLAB code.)
(Hint: You can write the variable y(t) in the given ODE in terms of x(t) according to the above exponential function.)
In(x) y = In(b) Eq 1 exponential.dat +4.60150E-01 +2.39874E-08 +5.00030E-01 +5.47430E-08 +9.70010E-01 +1.15877E-03 +1.21580E+00 +1.90430E-01 +1.24430E+00 +4.21577E-01 In(x) y = In(b) Eq 1 exponential.dat +4.60150E-01 +2.39874E-08 +5.00030E-01 +5.47430E-08 +9.70010E-01 +1.15877E-03 +1.21580E+00 +1.90430E-01 +1.24430E+00 +4.21577E-01
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
