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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started