Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

t: 0.731224323225772 0.732498612030249 0.733824905547381 0.735205326129754 0.736642082744805 0.738137474509642 0.739693894370123 0.741313832930079 0.742999882436810 0.744754740929238 0.746581216555340 0.748482232065787 0.750460829490967 0.752520175008883 0.754663564011715 0.756894426379149 0.759216331966913 0.761632996319317 0.764148286614905 0.766766227854774 0.769491009303433 0.772326991192516 0.775278711698089 0.778350894202694

t: 0.731224323225772 0.732498612030249 0.733824905547381 0.735205326129754 0.736642082744805 0.738137474509642 0.739693894370123 0.741313832930079 0.742999882436810 0.744754740929238 0.746581216555340 0.748482232065787 0.750460829490967 0.752520175008883 0.754663564011715 0.756894426379149 0.759216331966913 0.761632996319317 0.764148286614905 0.766766227854774 0.769491009303433 0.772326991192516 0.775278711698089 0.778350894202694 0.781548454853771 0.784876510430547 0.788340386531966 0.791945626098790 0.795697998283486 0.799603507682096 0.803668403942880 0.807899191767078 0.812302641317826 0.816885799053856 0.821655999005340 0.826620874509897 0.831788370427563 0.837166755854265 0.842764637354136 0.848590972731854 0.854655085367040 0.860966679133659 0.867535853928282 0.874373121832078 0.881489423932388 0.888896147830800 0.896605145865735 0.904628754078723 0.912979811954699 0.921671682967920 0.930718275966370 0.940134067428891 0.949934124630631 0.960134129753904 0.970750404983024 0.981799938623283 0.993300412285867 1.00527022918220 1.01772854357301 1.03069529141925 1.04419122228385 1.05823793253547 1.07285789990733 1.08807451946629 1.10391214105005 1.12039610823201 1.13755279887642 1.15540966734862 1.17399528844781 1.19333940313291 1.21347296611438 1.23442819538837 1.25623862379241 1.27893915266508 1.30256610769563 1.32715729705278 1.35275207188591 1.37939138929526 1.40711787787204 1.43597590591328 1.46601165242055 1.49727318099622 1.52981051675550 1.56367572637728 1.59892300142191 1.63560874504928 1.67379166227591 1.71353285391549 1.75489591435320 1.79794703331034 1.84275510176197 1.88939182217718 1.93793182325832 1.98845277936289 2.04103553479903 2.09576423319368 2.15272645214036 2.21201334334196 2.27371977847297 2.33794450099433 x: 13.2483182922083 11.5424692840372 10.7105296866503 11.5804231582159 11.9596345962915 11.8329909029784 11.4953146861269 13.0188589957272 10.9454444200735 11.7264141268056 11.3857302256214 11.7256443045336 11.5841956297507 12.3780628305001 11.3068373109950 11.4531682847815 12.0901327613547 12.7694890710259 10.7035240616570 13.2521297848166 11.3676533151943 12.4257280706229 12.6963820780760 12.8767788055246 11.5769282381962 11.9440887526957 11.8009063621846 11.4775848055454 12.0782017817664 12.1249694004102 11.6126532265402 11.9367058773695 13.6997519047760 11.8065360162183 12.2920162842723 11.4533719861065 11.3893445495409 11.4978750570314 12.1155366494639 11.1390414546261 10.3821842286483 11.6949893718977 11.3301146590021 11.8088727821067 11.6487753266186 12.0760742700339 12.1718581439835 10.5885798371850 10.4241406850037 11.8175743690272 11.6546750356787 10.7570411885907 12.2549489043471 11.3864141796306 11.4247570183956 11.5056062978691 11.8182465142363 12.3351476896417 11.0638116460634 10.0168259090753 11.9211967254818 10.5486861518778 12.0584428710642 10.7690747624771 12.2244231373124 10.6205168572266 10.4167754628390 11.8839686947596 10.2872846827990 11.7552418467091 11.6342806969752 11.2896709262714 11.2280212991922 13.0016703739068 11.4123075986988 11.6762068935104 11.3113426058144 11.5852747016068 11.9627002351808 13.8181487769159 12.6358386985995 12.7551041236577 13.2990046250121 14.5374996293169 13.5958695145103 15.4949659539052 14.7278421129773 16.2416582293417 15.8026767523275 18.2844726984044 19.3061776625930 19.3396072162255 21.1337496012897 22.2085281989096 24.1815355158536 24.8258662905606 26.9143908058326 27.6315951295915 28.8478160203340 30.9047665748139 image text in transcribed

Matlab: Having trouble computing 'R' and figuring out how to graph the polynomial fit. Also, confused on what the true value of 'N' is.

An engineering student that minors in zoology is studying how mice react to dangers. She sets up an experiment where she places a mouse inside a transparent tube and measures the location inside this tube at somewhat irregular intervals. She can't measure the exact locations since the mouse twists and turns a fair bit, and therefore the measured data is somewhat noisy. One such dataset is given in the mouse.mat file that is provided with the homework. The file contains two arrays: a t array that contains the time (in seconds) from when the mouse entered the tube, and an x array that contains the measured locations (in centimeters, measured from one end of the tube) of the mouse Create a script named scaredMouseFit.m that does the following: 1. Loads the data into the workspace. You can assume that the data file w be in the same directory as your script 2. Plots the locations vs time as individual data points marked with blue diamonds. Label the horizontal axis "Time (sec)", the vertical axis "Position (cm", and title the figure "Position of a scared mouse vs time". 3. Compute the coefficients of the 4th order polynomial which best fits the raw data. Plot this polynomial fit on top of the raw data points in the figure as a solid red curve. 4. Compute and display to screen the "R-value for the fit (see below) 5. Find the time where the acceleration of the mouse is maximum, and display both this time and the value of the acceleration. Also, mark the point on the curve fit when this occurs using a black cross. Use the curve fit for this see discussion below 6. Finally, place a comment at the top of your script with your name, and insert comments throughout that describe the different parts and steps of your code Computational details: The R-value is a commonly used measure of how well a curve fit describes the raw data. You will learn more about this in the ENME392 course, but for now we just say that an R-value near 1 probably means a good fit while a value near 0 means a useless fit. Given a set of N data points (zi, yi), i = 1, . . . ,N, and a curve fit y(z) (i.e., the polynomial in our problem), the R-value can be computed as follows: 1 Ji An engineering student that minors in zoology is studying how mice react to dangers. She sets up an experiment where she places a mouse inside a transparent tube and measures the location inside this tube at somewhat irregular intervals. She can't measure the exact locations since the mouse twists and turns a fair bit, and therefore the measured data is somewhat noisy. One such dataset is given in the mouse.mat file that is provided with the homework. The file contains two arrays: a t array that contains the time (in seconds) from when the mouse entered the tube, and an x array that contains the measured locations (in centimeters, measured from one end of the tube) of the mouse Create a script named scaredMouseFit.m that does the following: 1. Loads the data into the workspace. You can assume that the data file w be in the same directory as your script 2. Plots the locations vs time as individual data points marked with blue diamonds. Label the horizontal axis "Time (sec)", the vertical axis "Position (cm", and title the figure "Position of a scared mouse vs time". 3. Compute the coefficients of the 4th order polynomial which best fits the raw data. Plot this polynomial fit on top of the raw data points in the figure as a solid red curve. 4. Compute and display to screen the "R-value for the fit (see below) 5. Find the time where the acceleration of the mouse is maximum, and display both this time and the value of the acceleration. Also, mark the point on the curve fit when this occurs using a black cross. Use the curve fit for this see discussion below 6. Finally, place a comment at the top of your script with your name, and insert comments throughout that describe the different parts and steps of your code Computational details: The R-value is a commonly used measure of how well a curve fit describes the raw data. You will learn more about this in the ENME392 course, but for now we just say that an R-value near 1 probably means a good fit while a value near 0 means a useless fit. Given a set of N data points (zi, yi), i = 1, . . . ,N, and a curve fit y(z) (i.e., the polynomial in our problem), the R-value can be computed as follows: 1 Ji

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Carlos Coronel, Steven Morris

14th Edition

978-0357673034

More Books

Students also viewed these Databases questions

Question

Explain the function and purpose of the Job Level Table.

Answered: 1 week ago