Problem: The relatlonship between the Input of a system, x, and Its output, v. I
ID: 3699670 • Letter: P
Question
Problem: The relatlonship between the Input of a system, x, and Its output, v. Is assumed to be glven by Assume that p experlmental data pairs (x, y), I 1,2,..,p were obtained. The experimental data were saved In a MATLAB mat file named processdata.mat (downloadable from the assignment link). Write a MATLAB script named assignment9.m that: calculates the values of the relationship parameters c, and c generates the scatter plot using the experimental data and the plot of the fitting mathematical model on the same set of axes. 1. 2. Prepare a Word Document named: Assignmento9_Yourname.docx. 1. Copy and paste the code of your script 2. Insert the generated plots 3. Report the calculated values for c, and c,Explanation / Answer
%you havent told how variables are stored in process data.mat, so i am assuming it contains
%2 vectors x and y. If that is not the case please tell in comments, so that i can change the code
load processdata.mat;
p=polyfit(x,y,1);
c2=p(1);
c1=p(2);
scatter(x,y)
hold on
xx=min(x):.1:max(x);
plot(xx,polyval(p,xx))
legend('Experimental data','Fitted model')
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.