Question: ` ` ` function [ coeffVec , r 2 ] = myLinReg _ Username ( xi , yi ) % % % % % %
function coeffVecr myLinRegUsernamexiyi
Function file: myLinRegUsername.m
Purpose:
To obtain the parameters of a LS linear bestfit for
given data
Record of revisions Date Programmer Change:
Date Name Original program
Main Variables:
INPUTS:
xi xn vector of given x values
yi xn vector of given y values
OUTPUTS:
coeffVecx vector of coefficients of linear bestfit aalx
coeffVec is the intercept a
coeffVec is the slope a
rx rsquare value
nlengthxi;
assertlengthyinxi and yi should be vectors of the same length';
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
