Question: Please write it in matlab function [rmsvars lowndx] = a(filename) % [RMSVARS LOWNDX]=AFILENAME) finds the RMS errors of linear regression of the data in the

Please write it in matlab

function [rmsvars lowndx] = a(filename)

% [RMSVARS LOWNDX]=AFILENAME) finds the RMS errors of linear regression of the data in the file FILENAME by treating each column as a vector of dependent observations, using the other columns of the data as observations of independent varaibles. The individual RMS errors are returned in RMSVARS and the index of the smallest RMS error is returned in LOWNDX.

% INPUTS:

% FILENAME - character string, name of file to be processed; assume that the first row describes the data variables

% OUTPUTS:

% RMSVARS - 1xN array of RMS errors of linear regression

% LOWNDX - integer scalar, index into RMSVALS

% Read the test data from a CSV file; find the size of the data

% % STUDENT CODE GOES HERE: REMOVE THIS COMMENT

% % THEN READ THE FILE SPECIFIED BY THE INPUT ARGUMENT

% Compute the RMS errors for linear regression

% %

% % STUDENT CODE GOES HERE: REMOVE THE NEXT 2 LINES AND THIS COMMENT

% % THEN PERFORM THE COMPUTATIONS

% %

rmsvars = 0.1*(1:16);

lowndx = 1;

% Find the regression on your choice of standardized

% or unstandardized variables

% %

% % STUDENT CODE GOES HERE: REMOVE THIS COMMENT

% % THEN PERFORM THE COMPUTATIONS

% %

% Plot the results

% %

% % STUDENT CODE GOES HERE: REMOVE THIS COMMENT

% % THEN PLOT THE RESULTS

% %

end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!