SlideShare ist ein Scribd-Unternehmen logo
1 von 1
Downloaden Sie, um offline zu lesen
MatLab code that satisfies the following prompt and restrictions while being well commented
thanks! Summary Lets recap what you need to do. I'm only partly sorry for writing a problem
that needs a table of contents and summary. 1. Filter outliers from your data set. 2. Compute the
linear regression on your filtered data set. 3. Compute the R2 value from your filtered data and
your linear regression function. Here is the function specification. Name: linearRegression
Inputs: 1. x-values of the data set 2. y-values of the data set Outputs: 1. Filtered x-values (i.e. the
input x-values but without the outlier points), sorted from smallest to largest 2. Filtered y-valeus
(i.e. the input y-values but without the outlier points), sorted from smallest to largest 3. Slope
from the linear regression ( m in f(x)=mx+b ) 4. Intercept from the linear regression (b in
f(x)=mx+b ) 5. Rsquared value
begin{tabular}{|l|ll} 1 & function [fx,fY, slope, intercept, Rsquared] = linearRegression (x,y) 
2 & % inearRegression Computes the linear regression of a data set  3 & % & Compute the
linear regression based on inputs:  4 & % & 1. x:x-values for our data set  5 & % & 2. y:y-
values for our data set  6 & % &  7 & % & Outputs:  8 & % & 1. fX:x-values with outliers
removed  9 & % & 2. fY:y-values with outliers removed  10 & % & 3. slope: slope from the
linear regression y=mx+b  11 & % & 4. intercept: intercept from the linear regression y=mx+b
 12 & % & 5. Rsquared: R2, a.k.a. coefficient of determination  13 & end{tabular} Code to
call your function?

Weitere ähnliche Inhalte

Ähnlich wie MatLab code that satisfies the following prompt and restrictions whi.pdf

More instructions for the lab write-up1) You are not obli.docx
More instructions for the lab write-up1) You are not obli.docxMore instructions for the lab write-up1) You are not obli.docx
More instructions for the lab write-up1) You are not obli.docx
gilpinleeanna
 

Ähnlich wie MatLab code that satisfies the following prompt and restrictions whi.pdf (20)

MATLAB for Technical Computing
MATLAB for Technical ComputingMATLAB for Technical Computing
MATLAB for Technical Computing
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 
Tutorial2
Tutorial2Tutorial2
Tutorial2
 
Matlab ppt
Matlab pptMatlab ppt
Matlab ppt
 
eee2-day4-structures engineering college
eee2-day4-structures engineering collegeeee2-day4-structures engineering college
eee2-day4-structures engineering college
 
Mat lab
Mat labMat lab
Mat lab
 
Matlab introduction
Matlab introductionMatlab introduction
Matlab introduction
 
R basics
R basicsR basics
R basics
 
2. operator
2. operator2. operator
2. operator
 
MATLAB-Introd.ppt
MATLAB-Introd.pptMATLAB-Introd.ppt
MATLAB-Introd.ppt
 
Broom: Converting Statistical Models to Tidy Data Frames
Broom: Converting Statistical Models to Tidy Data FramesBroom: Converting Statistical Models to Tidy Data Frames
Broom: Converting Statistical Models to Tidy Data Frames
 
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulinkMATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
MATLAB/SIMULINK for Engineering Applications day 2:Introduction to simulink
 
introduction to matlab.pptx
introduction to matlab.pptxintroduction to matlab.pptx
introduction to matlab.pptx
 
More instructions for the lab write-up1) You are not obli.docx
More instructions for the lab write-up1) You are not obli.docxMore instructions for the lab write-up1) You are not obli.docx
More instructions for the lab write-up1) You are not obli.docx
 
Legacy lambda code
Legacy lambda codeLegacy lambda code
Legacy lambda code
 
Mbd2
Mbd2Mbd2
Mbd2
 
Mechanical Engineering Homework Help
Mechanical Engineering Homework HelpMechanical Engineering Homework Help
Mechanical Engineering Homework Help
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptx1.1Introduction to matlab.pptx
1.1Introduction to matlab.pptx
 
Matlab anilkumar
Matlab  anilkumarMatlab  anilkumar
Matlab anilkumar
 

Mehr von pratikradia365

M.B. is a 65-year-old male who is being admitted from the emergency .pdf
M.B. is a 65-year-old male who is being admitted from the emergency .pdfM.B. is a 65-year-old male who is being admitted from the emergency .pdf
M.B. is a 65-year-old male who is being admitted from the emergency .pdf
pratikradia365
 
L�neas de cruceros Carnival Aunque los viajes por mar han tenido.pdf
L�neas de cruceros Carnival Aunque los viajes por mar han tenido.pdfL�neas de cruceros Carnival Aunque los viajes por mar han tenido.pdf
L�neas de cruceros Carnival Aunque los viajes por mar han tenido.pdf
pratikradia365
 
Materia Comunicaci�n empresarialGui�n Esta es la historia de Ch.pdf
Materia Comunicaci�n empresarialGui�n Esta es la historia de Ch.pdfMateria Comunicaci�n empresarialGui�n Esta es la historia de Ch.pdf
Materia Comunicaci�n empresarialGui�n Esta es la historia de Ch.pdf
pratikradia365
 

Mehr von pratikradia365 (20)

M.B. is a 65-year-old male who is being admitted from the emergency .pdf
M.B. is a 65-year-old male who is being admitted from the emergency .pdfM.B. is a 65-year-old male who is being admitted from the emergency .pdf
M.B. is a 65-year-old male who is being admitted from the emergency .pdf
 
L�neas de cruceros Carnival Aunque los viajes por mar han tenido.pdf
L�neas de cruceros Carnival Aunque los viajes por mar han tenido.pdfL�neas de cruceros Carnival Aunque los viajes por mar han tenido.pdf
L�neas de cruceros Carnival Aunque los viajes por mar han tenido.pdf
 
Los virus que infectan a los eucariotas tambi�n han evolucionado con.pdf
Los virus que infectan a los eucariotas tambi�n han evolucionado con.pdfLos virus que infectan a los eucariotas tambi�n han evolucionado con.pdf
Los virus que infectan a los eucariotas tambi�n han evolucionado con.pdf
 
Los t�cnicos m�dicos de emergencia (EMT, por sus siglas en ingl�s) n.pdf
Los t�cnicos m�dicos de emergencia (EMT, por sus siglas en ingl�s) n.pdfLos t�cnicos m�dicos de emergencia (EMT, por sus siglas en ingl�s) n.pdf
Los t�cnicos m�dicos de emergencia (EMT, por sus siglas en ingl�s) n.pdf
 
Los sistemas de control pueden hacer que las personas Pregunta 13 .pdf
Los sistemas de control pueden hacer que las personas Pregunta 13 .pdfLos sistemas de control pueden hacer que las personas Pregunta 13 .pdf
Los sistemas de control pueden hacer que las personas Pregunta 13 .pdf
 
Los tres tipos principales de pron�sticos utilizados por las organiz.pdf
Los tres tipos principales de pron�sticos utilizados por las organiz.pdfLos tres tipos principales de pron�sticos utilizados por las organiz.pdf
Los tres tipos principales de pron�sticos utilizados por las organiz.pdf
 
Los trabajadores 1,..., n est�n actualmente inactivos. Supongamos qu.pdf
Los trabajadores 1,..., n est�n actualmente inactivos. Supongamos qu.pdfLos trabajadores 1,..., n est�n actualmente inactivos. Supongamos qu.pdf
Los trabajadores 1,..., n est�n actualmente inactivos. Supongamos qu.pdf
 
Los tipos de sangre humana se heredan en un patr�n co-dominante. Hay.pdf
Los tipos de sangre humana se heredan en un patr�n co-dominante. Hay.pdfLos tipos de sangre humana se heredan en un patr�n co-dominante. Hay.pdf
Los tipos de sangre humana se heredan en un patr�n co-dominante. Hay.pdf
 
Los valores m�s grandes de tienen la desventaja de aumentar la proba.pdf
Los valores m�s grandes de tienen la desventaja de aumentar la proba.pdfLos valores m�s grandes de tienen la desventaja de aumentar la proba.pdf
Los valores m�s grandes de tienen la desventaja de aumentar la proba.pdf
 
Los siguientes son motivos razonables para las fusiones I) evitar.pdf
Los siguientes son motivos razonables para las fusiones I) evitar.pdfLos siguientes son motivos razonables para las fusiones I) evitar.pdf
Los siguientes son motivos razonables para las fusiones I) evitar.pdf
 
Los proveedores de atenci�n m�dica son responsables de documentar y .pdf
Los proveedores de atenci�n m�dica son responsables de documentar y .pdfLos proveedores de atenci�n m�dica son responsables de documentar y .pdf
Los proveedores de atenci�n m�dica son responsables de documentar y .pdf
 
mauriland is a fictitious country with only two politically active g.pdf
mauriland is a fictitious country with only two politically active g.pdfmauriland is a fictitious country with only two politically active g.pdf
mauriland is a fictitious country with only two politically active g.pdf
 
Los puntos principales, subpuntos y subsubpuntos deben escribirse en.pdf
Los puntos principales, subpuntos y subsubpuntos deben escribirse en.pdfLos puntos principales, subpuntos y subsubpuntos deben escribirse en.pdf
Los puntos principales, subpuntos y subsubpuntos deben escribirse en.pdf
 
Mathew siempre llega tarde a la oficina. Al gerente de Mathew no le .pdf
Mathew siempre llega tarde a la oficina. Al gerente de Mathew no le .pdfMathew siempre llega tarde a la oficina. Al gerente de Mathew no le .pdf
Mathew siempre llega tarde a la oficina. Al gerente de Mathew no le .pdf
 
Los riesgos que pueden resultar en que un sistema o proceso no fun.pdf
Los riesgos que pueden resultar en que un sistema o proceso no fun.pdfLos riesgos que pueden resultar en que un sistema o proceso no fun.pdf
Los riesgos que pueden resultar en que un sistema o proceso no fun.pdf
 
Match up the following The chance of a type 2 error is reduced.pdf
Match up the following The chance of a type 2 error is reduced.pdfMatch up the following The chance of a type 2 error is reduced.pdf
Match up the following The chance of a type 2 error is reduced.pdf
 
Match the Late Paleozoic time period with the appropriate life. You.pdf
Match the Late Paleozoic time period with the appropriate life.  You.pdfMatch the Late Paleozoic time period with the appropriate life.  You.pdf
Match the Late Paleozoic time period with the appropriate life. You.pdf
 
Match the following proteins with the best description of their func.pdf
Match the following proteins with the best description of their func.pdfMatch the following proteins with the best description of their func.pdf
Match the following proteins with the best description of their func.pdf
 
Materia Comunicaci�n empresarialGui�n Esta es la historia de Ch.pdf
Materia Comunicaci�n empresarialGui�n Esta es la historia de Ch.pdfMateria Comunicaci�n empresarialGui�n Esta es la historia de Ch.pdf
Materia Comunicaci�n empresarialGui�n Esta es la historia de Ch.pdf
 
Match the STRIDE threat with its description. Match the STRIDE threa.pdf
Match the STRIDE threat with its description. Match the STRIDE threa.pdfMatch the STRIDE threat with its description. Match the STRIDE threa.pdf
Match the STRIDE threat with its description. Match the STRIDE threa.pdf
 

Kürzlich hochgeladen

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Kürzlich hochgeladen (20)

How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 

MatLab code that satisfies the following prompt and restrictions whi.pdf

  • 1. MatLab code that satisfies the following prompt and restrictions while being well commented thanks! Summary Lets recap what you need to do. I'm only partly sorry for writing a problem that needs a table of contents and summary. 1. Filter outliers from your data set. 2. Compute the linear regression on your filtered data set. 3. Compute the R2 value from your filtered data and your linear regression function. Here is the function specification. Name: linearRegression Inputs: 1. x-values of the data set 2. y-values of the data set Outputs: 1. Filtered x-values (i.e. the input x-values but without the outlier points), sorted from smallest to largest 2. Filtered y-valeus (i.e. the input y-values but without the outlier points), sorted from smallest to largest 3. Slope from the linear regression ( m in f(x)=mx+b ) 4. Intercept from the linear regression (b in f(x)=mx+b ) 5. Rsquared value begin{tabular}{|l|ll} 1 & function [fx,fY, slope, intercept, Rsquared] = linearRegression (x,y) 2 & % inearRegression Computes the linear regression of a data set 3 & % & Compute the linear regression based on inputs: 4 & % & 1. x:x-values for our data set 5 & % & 2. y:y- values for our data set 6 & % & 7 & % & Outputs: 8 & % & 1. fX:x-values with outliers removed 9 & % & 2. fY:y-values with outliers removed 10 & % & 3. slope: slope from the linear regression y=mx+b 11 & % & 4. intercept: intercept from the linear regression y=mx+b 12 & % & 5. Rsquared: R2, a.k.a. coefficient of determination 13 & end{tabular} Code to call your function?