{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Lab Test #1 v2

# Lab Test #1 v2 - Assume that q and Q are both 2x10-5 C and...

This preview shows page 1. Sign up to view the full content.

ECOR 2606 Lab Test #1 v2 (This problem adapted from problem 5.17 in the text) An electrical charge Q is uniformly distributed around a ring shaped conductor with radius a . A charge q is located at a distance x from the centre of the ring. The force F exerted on the charge by the ring is given by: 5 . 1 2 2 0 4 1 a x qQx e F where e 0 = 8.85x10-12 C 2 /(N m 2 ) F is in Newtons (N) q and Q are in Coulombs (C) a and x are in metres (m) Part I (3 marks): Write a function m-file (force.m) that, given q , Q , a , and x, computes and returns F . Have your function generate an error if a is less than or equal to zero . Part II (7 marks): The steps required to solve this part should be placed in a script m-file (script.m). Assume that
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Assume that q and Q are both 2x10-5 C and that a is 0.9m. ** Note ** Your are expected to make use of the function you produced in part I instead of re-implementing the equation within your script file. If you find it necessary to re-implement the equation you may do so but students who do this will not earn full marks. i) Produce two plots (figures 1 and 2) of F vs x for x from -0.2m to 1.2m. Produce one plot using function fplot and the other using function plot ). ii) If F is 1.5N, what is distance x ? There are two possible solutions. Precisely locate both solutions (graphical solutions are NOT acceptable) and output them using function fprintf ....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online