Question 3: Matlab (Bonus 5 pts, which can be added to any other homework set!)
ID: 3887507 • Letter: Q
Question
Question 3: Matlab (Bonus 5 pts, which can be added to any other homework set!) Download the program electric3.m In this program, you specify the coordinates of a system of charges, similar to HW 2, ie. the x coordinates of the charges, then the y coordinates of the charges, then an array q that represents the charges in the system: For example: x=[-5 5 ]; % x coordinates of charges, separate by colon (:) y=[0 0]; % y coordinates of charges, separate by colon (;) % charge q +1 +1] (So in this case, you have a charge at-5, y=0, q=1, and another one at x=5, y=0, q=1) x= The program calculates the electric field in x-y space, which is 20 meters by 20 meters in size ( 10 to 10 in x), C10 to 10 im y). When you run it, it will ask you for a position in space at which it calculates the electric field by asking you: enter coordinates you are looking for, in the form [x y], followed by Enter Run the program a) Verify that if you place two charges on the x axis, symmetric with respect to the origin, and of x-0, y= 3m). equal value, the electric field at points on the y-axis will be in the y direction (For example, at b) One use of this method is to approximate a continuous line of charge as a set of discrete points like we did in the problem session. Take a line of charge that is 10 meters in length, situated on the x-axis, of charge density C/m (So total charge is 10 C). ! Approximate the line as 5 points that are equally spaced (Sox-I-5-25 02.5 51. y-[0 000 01) and of appropriate charge qi. q5 Use the program to calculate the electric field at the point x=0, y 5 m. Compare the result from the program height Z above a finite line. How do the results compare? What is the error in the numerical computation? to the exact result using the formula we derived in class for the electric field at at aExplanation / Answer
The square root of a negative real number is called an imaginary quantity or imaginary number. e.g., -3, -7/2 The quantity -1 is an imaginary number, denoted by ‘i’, called iota. Integral Powers of Iota (i) i=-1, i2 = -1, i3 = -i, i4 =1 So, i4n+1= i, i4n+2 = -1, i4n+3 = -i, i4n+4 = i4n = 1 In other words, i n = (-1)n/2, if n is an even integer i n = (-1)(n-1)/2.i, if is an odd integer Complex Number A number of the form z = x + iy, where x, y R, is called a complex number The numbers x and y are called respectively real and imaginary parts of complex number z. i.e., x = Re (z) and y = Im (z) Purely Real and Purely Imaginary Complex Number A complex number z is a purely real if its imaginary part is 0. i.e., Im (z) = 0. And purely imaginary if its real part is 0 i.e., Re (z)= 0. Equality of Complex Numbers Two complex numbers z1 = a1 + ib1 and z2 = a2 + ib2 are equal, if a2= a2 and b1 = b2 i.e., Re (z1) = Re (z2) and Im (z1) = Im (z2). Algebra of Complex Numbers 1. Addition of Complex Numbers Let z1 = (x1 + iyi) and z2 = (x2 + iy2) be any two complex numbers, then their sum defined as z1 + z2 = (x1 + iy1) + (x2 + iy2) = (x1 + x2) + i(y1 + y2)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.