Question

Problem: The relationship between a variable g and time t for a certain process is given by: go=p, In +e 2 sin(0.3t) A set of
The MAT data file t2pb2data.mat contains the experimental data vectors t and g. The data file is available under the test lin
0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: If you have any queries related the answer please do comment. I would be very happy to resolve all your queries.

Please note in order to run the program you should have t2pb2data.mat file in your current directory as mentioned in question

clc
clear all
close all
format long
A=load('t2pb2data.mat');
t=A(:,1);
g=A(:,2);
A=[log(1./t(:).^3) sin(0.3*t)];
b=g(:);
C=A\b;
p1=C(1);
p2=-log(C(2));
f=@(t) p1*log(1./t.^3)+exp(-p2)*sin(0.3*t);
fprintf('The calculated coefficients are: \n');
fprintf('p1=%.4f\np2=%.4f\n',p1,p2);
SSR=sum((g-f(t)).^2);
SST=sum((g-mean(g)).^2);
R2=1-SSR/SST;
fprintf('R2=%.5f\n',R2);
tt=linspace(min(t),max(t),101);
yy=f(tt);
plot(tt,yy,t,g,'o');
xlabel('t');
ylabel('g(t)');
title('Plot of fit g(t)');
legend('g(t)','raw data');

- O X Pradeep PUBLISH VIEW do E C . Search Documentation E Bulleted List Preformatted Text Numbered List E Code Image Display

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
Problem: The relationship between a variable g and time t for a certain process is given...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Q2. (15 pts) Before calculators were readily available, students used tables to determine the values of...

    Q2. (15 pts) Before calculators were readily available, students used tables to determine the values of mathematical functions like sine, cosine, and log. In order to create such a table for sine, write a matlab script using the following steps: • Create a vector of angle values from 0 to 2n in increments of 110. • Calculate the sine of each of the angles, and group your results into a table that includes the angle and the sine value. •...

  • Paragraf 111020030 Stiller 3010012003311416 Q2. (15 pts) Before calculators were readily available, students used tables to...

    Paragraf 111020030 Stiller 3010012003311416 Q2. (15 pts) Before calculators were readily available, students used tables to determine the values of mathematical functions like sine, cosine, and log. In order to create such a table for sine, write a matlab script using the following steps: • Create a vector of angle values from 0 to 2n in increments of 1/10. • Calculate the sine of each of the angles, and group your results into a table that includes the angle and...

  • A group of physics students collected data from a test of the projectile motion problem that...

    A group of physics students collected data from a test of the projectile motion problem that was analyzed in a previous lab exercise (L5). In their test, the students varied the angle and initial velocity Vo at which the projectile was launched, and then measured the resulting time of flight (tright). Note that tright was the dependent variable, while and Vo were independent variables. The results are listed below. (degrees) Time of Flight (s) Initial Velocity V. (m/s) 15 20...

  • Section 1 Tube [FeSCN^+] M Absorbance 1 0.0005 0.016 2 0.0011 0.0422 3 0.00367 0.0917 4...

    Section 1 Tube [FeSCN^+] M Absorbance 1 0.0005 0.016 2 0.0011 0.0422 3 0.00367 0.0917 4 0.00727 0.224 5 0.00965 0.267 6 0.0137 0.398 Part B unknown sol.   0.175 SCENARIO: Five standard solutions containing different known concentrations of an iron (II) thiocyanate (FeSCN+ ) complex are analyzed using spectrophotometry, a technique which measures the quantity of light absorbed by the solution as a function of the concentration of the analyte in solution (in this case, FeSCN+ ). The results of...

  • (3) Re-read the Introduction, giving particular attention to its final paragraph. Now, suppose th...

    (3) Re-read the Introduction, giving particular attention to its final paragraph. Now, suppose that physical considerations lead you to expect that measurements on a certain thermodynamic system will lead to the following relationship between the pressure p and the temperature T p %(kT) where k is a constant. Pressure measurements are taken on the system as the temperature is varied, and you would like to perform a curve fit on this data in order to measure the constant k. As...

  • Need help on C++ (User-Defined Function) Format all numerical decimal values with 4 digits after ...

    need help on C++ (User-Defined Function) Format all numerical decimal values with 4 digits after the decimal point. Process and sample run: a) Function 1: A void function that uses parameters passed by reference representing the name of a data file to read data from, amount of principal in an investment portfolio, interest rate (any number such as 5.5 for 5.5% interest rate, etc.) , number of times the interest is compounded, and the number of years the money is...

  • Question 2 (Modified from Sleuth 7.27) Black wheatears, Oenanthe leucura, are small birds of Spain and...

    Question 2 (Modified from Sleuth 7.27) Black wheatears, Oenanthe leucura, are small birds of Spain and Morocco. Males of the species demonstrate an exaggerated sexual display by carrying heavy stones to nesting cavities. Different males carry somewhat different sized stones, prompting a study of whether larger stones may signal a higher health status. M. Soler et al. (1999) calculated the average stone mass (grams) carried by each of 21 male black wheatears, along with T-cell response measurements reflecting their immune...

  • A recent article in BusinessWeek listed the “Best Small Companies.” We are interested in the relationship between the companies’ sales and earnings. A random sample of 12 companies wasselected and the...

    A recent article in BusinessWeek listed the “Best Small Companies.” We are interested in the relationship between the companies’ sales and earnings. A random sample of 12 companies wasselected and the sales and earnings, in millions of dollars, are reported below: Company Papa John’s InternationalApplied Innovation Integracare Wall Data Davidson & AssociatesChico’s FAS Checkmate Electronics Royal Grip M-Wave Serving-N-Slide Daig Cobra Golf Sales ($ millions) $29.2 18.6 18.2 71.7 58.6 46.8 17.5 11.9 19.6 51.2 28.6 69.2 Earnings ($ millions)...

  • 1. (55 points) The investigators are interested in asses the relationship between Systolic Blood Pressure (SBP)...

    1. (55 points) The investigators are interested in asses the relationship between Systolic Blood Pressure (SBP) in mm Hg and Age in years among Hypertensive Patients. Specif- ically, whether a patient's SBP can be predicted from his or her age. They selected n=122 patients at random from a medical record database in a hospital. Assume that the simple linear regression model is appropriate. The following table shows regression output of a simple linear regression model relating the SBP to the...

  • Hello I need help with this program. Should programmed in C! Program 2: Sorting with Pointers...

    Hello I need help with this program. Should programmed in C! Program 2: Sorting with Pointers Sometimes we're given an array of data that we need to be able to view in sorted order while leaving the original order unchanged. In such cases we could sort the data set, but then we would lose the information contained in the original order. We need a better solution. One solution might be to create a duplicate of the data set, perhaps make...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT