Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

lab06VoltageData.dat Current, Voltage 10,0.96 20,1.99 30,3.03 40,3.97 50,4.92 60,5.92 70,7.03 80,8.04 90,8.91 2 Lab Assignment During this lab period, complete the following. Upload your

image text in transcribedimage text in transcribed

lab06VoltageData.dat Current, Voltage 10,0.96 20,1.99 30,3.03 40,3.97 50,4.92 60,5.92 70,7.03 80,8.04 90,8.91 2 Lab Assignment During this lab period, complete the following. Upload your m-files and images of your plots (in .png format) to canvas. Turn in a .pdf file or .txt file with your answers to the following questions and your m-files for your code on Canvas. Look at the submission template on Canvas to better understand how your file should look. Write a script for each problem. 1. Basic line/scatter plot Here you will import some data, plot it along with a best-fit trend line. (a) Import data from the file "lab06VoltageData.dat". The first column is current data in microamps (independent variable), the second column is voltage data in millivolts (dependent variable). (b) Plot these data as open circles (c) Add a solid line corresponding to the equation V = 0.0998A-0.0172, where V is the voltage in mV and A is the current in microamps. (d) Add axis labels. (e) Add a legend. (f) increase the font size to 12 points using the following function set(findall(gcf,'-property', 'FontSize'), 'FontSize', 12) (g) Save your figure as both a .fig file and a .png file. The MATLAB .fig file can be opened later and edited. 2. Working with subplots (a) Create a subplot with two rows and one column (b) In the upper plot, plot the sin function over the range of 0 to 3600 degrees. Use a Line Width of 2 and a color of red. (c) In the lower plot, plot the cos function over the range 0 to 3600 degrees. Use a Line Width of 3 and a color of green. (d) Adjust the x-axes of the plots so that they are in the range of 0-3600. (e) Add axis labels and a title to the plot. (f) Save your figure as both a .fig file and a .png file. 3. Editing plots You may desire to modify a plot after it is generated. MATLAB has two main ways of doing this. The first is the graphical user interface of the plot editor. The second is using the set and get functions. The latter is useful if you want to generate and modify many plots with minimal user interaction. In the exercise below, you will use the plot editor to edit the upper subplot and the set function to modify the lower subplot.

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

Engineering Mechanics Statics

Authors: R. C. Hibbeler

12th Edition

136077900, 978-0136077909

More Books

Students also viewed these Mechanical Engineering questions

Question

Explain community psychologys interest in social change.

Answered: 1 week ago

Question

What are the components of the stress process?

Answered: 1 week ago