You are on page 1of 1

EE 303 Electromagnetic Fields __ Fall 2018

MATLAB Assignment 1
Due: Oct. 30, 2018
Submit your homework in time.
Students would lose 20% of the grade for each late day.

Collaboration / Academic Integrity


− It is acceptable to discuss with others possible general approaches to problems.
− It is not acceptable to work together on a detailed solution, to copy a solution, or to give
away a solution.
− Students will be examined randomly in their homework solutions.
o If a student failed to explain his/her solution, he/she will be considered copying the
homework and lose a big percentage of the overall homework grade

Problem 1

For a vector 𝐴 = 𝑎𝑥 3𝑥 2 cos(3𝑦) − 𝑎𝑦 sin(2𝑥) 𝑦 2, 𝑦


a) Write a MATLAB code to evaluate ∮ 𝐴 ∙ 𝑑𝑙 around the
contour shown in figure (0, 3)
b) Evaluate ∇ × 𝐴 then write a MATLAB code to evaluate
∫(∇ × 𝐴) ∙ 𝑑𝑠 over the shaded area
c) Compare the results of the previous two points and (3, 0)
comment. (0, 0) 𝑥

(3, -3)

Hints:

− ∮ 𝐴 ∙ 𝑑𝑙 is translated into ∑ 𝐴 ∙ 𝑑𝑙 when used in computer calculations


− ∫(∇ × 𝐴) ∙ 𝑑𝑠 is translated into ∑ (∑(∇ × 𝐴) ∙ 𝑑𝑥) 𝑑𝑦 when used in computer calculations
− The discretization strategy is to use { < 0.1*(minimum dimension in the problem)} as the
discretization steps. i.e. to use dx, dy & dz to be { < 0.1*(minimum dimension in the problem)}

You might also like