2 LON-CAPAC2-volume-5 | + ea between Two arvest es/Microsoft.MicrosoftEdg te/Dow
ID: 3195439 • Letter: 2
Question
2 LON-CAPAC2-volume-5 | + ea between Two arvest es/Microsoft.MicrosoftEdg te/Downloads/ASSGTS.pdf s/april/ Due: Thursday, February 1, 2018 Your taak is to write a MATLAB script that will plot a set of data and St a curve to the data. The scrigt shouald Part 1 1. Have a section that allows the user to enter the name of a data ile 2. Be capable of reading data stored in either rows or columns 3. Allow the user to select the color and type of plot symbol 4. Once the data is eatered, it should plot the x - y data the program so the aser can view the cutput of the plot, then fit the data with a linear line use the polyfit command to find the coefficiests of the equation. Instead use linear algebra to solve Do not use the the equations for the best &t; shown in the text book. 6. Allow the user to select the color of the lise, and plot the x -y data and best fit line on the same graph 7. Calculate the absolute error and relative error. Have the script display the maxamum value of both errors and the x coordinate corresponding to each maximam error. (Be carefal with dividing by zero. What do you 8. Calculate the r-squared value 9. Add the equation of the line and the r-squared value to the graph (for now enter the words r-squared, we will you how to enter r late) 10. Have a section that will allow the user to enter the plot title, and x and y axis labels 11. Allow the user to estimate the value of the best fit for any x coordinate 12. Once the user is satisied with the results, the script should allow the user to enter a nea set of data without ending the program Do not use a eau for this Make sure the script allows for user input error (ie. Check for words versus characters and for incorrect characters) 13. Once you have completed thas, esiter the same data sets into Excel and fit a trend line to the data. Do you get the same equations and r-squared talue? What software would you use it giveen this task to do for another class? Part 2 14. 15. For the polymomial fit use polyfit, the progranm should use st least 300 data points to plot the curve and the 16. Once the polynomial ia fit to the data the program shculd alloa the user to try different degree fits to the 17, Add the equation to the plot, alcng with titles and labels. Note, adding the equation to the plot requires you Once the script is coemplete, modify it so the user has the option to fit a lunear line or a pelynomial. Use an if statement to select the choice program should be capable of starting the curve at the smallest and largest x cooerdinate without user input data. Make sure yeu check for the maximan degree to build a string arrayExplanation / Answer
actually, it's not clear what you have put on board so, make the question avail of good quality image
thanks chegg expert
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.