Lab 200 - MATLAB Practice Assignment

# Tables and plot relations between data sets though it

• Homework Help
• 5
• 100% (1) 1 out of 1 people found this document helpful

This preview shows page 2 - 5 out of 5 pages.

tables and plot relations between data sets, though it is also capable of allowing the user to “explore and visualize ideas and collaborate across [many] disciplines” beyond Physics. In this lab, we will explore its usage and learn to be familiar with the program. 1 Desktop / Laptop Computer & Monitor 1 MathWorks, Inc. M ATLAB R2014 and Simulink Software 1 Keyboard 1 Mouse 1 Microsoft Office Word 2015 Software 1 USB Theory: 1. ? = 𝑘 ? ? 2 𝑘 = 9.0 • 10 9 ? = 2.0 • 10 −9 2. ? = [ 1.0 1.5 2.0 2.5 3.0 4.0 6.0 8.0 ] ? = [ 210 160 130 100 90 60 45 32 ]

Subscribe to view the full document.

Experimental Procedure: Part I (i) Plot ? vs. ? (ii) Plot ? vs. ? Part II (i) Plot 1 𝐶 vs. ? (ii) Create a line of regression (a linear fit) of the form: ? = 𝑚? + 𝑏
Part I: M ATLAB Code k = 9.0 * 10 ^ 9; q = 2.0 * 10 ^ -9; r = [0.5 : 0.1 : 5.0]; E = k * q ./ (r.^2) plot(r, E); hold on ; title( 'Electric Field vs. Radius (E vs. r)' ); xlabel( 'Radius' ); % x-axis label ylabel( 'Electric Field' ); % y-axis label

Subscribe to view the full document.

Part II: M ATLAB Code D = [1 1.5 2 2.5 3 4 6 8] .* 10 ^ -3; C = [210 160 130 100 90 60 45 32] .* 10 ^ -12; plot(D, 1 ./ C, 'blue' ); hold on ; coefficients = polyfit(D, 1 ./ C, 1); m = coefficients(1); b = coefficients(2); x = D; y = 1 ./ C; y = m * x + b; plot(x, y, 'red' ); hold on ; title( 'Electric Charge vs. Distance (Regression)' ); xlabel( 'Distance' ); % x-axis label ylabel( 'Electric Charge' ); % y-axis label
• Spring '11
• Opyrchal
• Physics, matlab, Electric charge, The MathWorks, MATLAB Practice Assignment, Plot ????⃗ vs

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern