Question
csn i get the m file for mathlab plz
QUESTION #2 ture-conductivity data in Table 1 is from a material that is known to follow Arrhenius The temperat law: -1000 S


20 POINTS Table 1 applies to Questions 2 and 3. 250 2.7 298 3.6 260 2.9 273 3.2 300 3.8 280 290 3.1 4.0 3.7 QUESTION #2 The t
QUESTION #2 ture-conductivity data in Table 1 is from a material that is known to follow Arrhenius The temperat law: -1000 S Аевт Perform a least squares regression analysis to find the best-fit values for A and B. Find also the R'value, where B T S-S Plot a graph to show the data points together with the best-fit curve. o wrse Save your main m-file: 02_studentID.m Write the program such that when executed, only the final answers and plots are displayed. If you use a function file, title it '02_studentID _F.m' On the Ist line of each m-file, type % Student ID, Q2
20 POINTS Table 1 applies to Questions 2 and 3. 250 2.7 298 3.6 260 2.9 273 3.2 300 3.8 280 290 3.1 4.0 3.7 QUESTION #2 The temperature-conductivity data in Table 1 is from a material that is known to follow Arrhenius law: -1000 S-Ae BT Perform a least squares regression analysis to find the best-fit values for A and B. Find also the R' value, where S-s S-S Plot a graph to show the data points together with the best-fit curve.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB Code:

close all
clear
clc

T = [250 260 270 273 280 290 298 300 310]';
S = [2.7 2.9 3.1 3.2 3.4 3.6 3.7 3.8 4.0]';

% S = A*exp(-1000/(B*T))
% => ln(S) = ln(A) - (1000/B)*(1/T)
P = [ones(size(T)) 1./T];
C = P\log(S);

% ln(A) = C(1)
A = exp(C(1));

% -1000/B = C(2)
B = -1000/C(2);
fprintf('Model: S = %.4f * exp(-1000 / (%.4f * T))\n', A, B)

TT = min(T)-10:1:max(T)+10;
plot(T,S,'o',TT,A*exp(-1000./(B*TT)))
title('Least Squares Fit'), xlabel('T'), ylabel('S')
legend('Data Points', 'Least Squares Fit', 'Location', 'northwest')

R2 = 1 - sum((S - (A * exp(-1000 ./ (B*T)))).^2) / sum((S - sum(S)/length(S)).^2);
fprintf('R-Squared Value: %.8f\n', R2)

Output:

Model: S = 20.9337 * exp(-1000 / (1.9501 * T))
R-Squared Value: 0.99569270

Plot:

Least Squares Fit 4.4 O Data Points 4.2 Least Squares Fit 4 3.8 3.6 CD 3.4 3.2 2.8 2.6 2.4 240 250 260 270 280 290 300 310 32

Add a comment
Know the answer?
Add Answer to:
csn i get the m file for mathlab plz QUESTION #2 ture-conductivity data in Table 1 is from a material that is known to follow Arrhenius The temperat law: -1000 S Аевт Perform a least squares...
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
  • Project Number 9 Statistical analysis of radiation data recorded by an ionization chamber Project Number 9...

    Project Number 9 Statistical analysis of radiation data recorded by an ionization chamber Project Number 9 Statistical analysis of radiation data recorded by an ionization chamber In this project, you are required to statistically analyze the data of radiation dose recorded by an ionization chamber experimentally in the research lab. Background of the problem: For measuring the radiation dose delivered to a body by a given radiation beam, an ionization chamber (detector) is used. An ionization chamber is made up...

  • Beer’s Law Objective : We will explore an application of absorption spectroscopy using calibration curves and...

    Beer’s Law Objective : We will explore an application of absorption spectroscopy using calibration curves and Beer’s Law. Use the “LAB : HOW TO…” link from the class website if you need help with how to use balance, Bunsen burner… and such. Introduction: You may write this information in your lab notebook for your own reference. It can’t be cut and pasted. Different solutions have different spectral properties. In this portion of the experiment those properties will be utilized to...

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