Page 1 of 1

Homework 5, due October 8, 2014.

Posted: Fri Oct 03, 2014 10:42 am
by goodwine
Reading: Chapter 4.

Exercises: 4.3, 4.4, 4.6, 4.7, 4.9, 4.12, 4.14 and 4.15.

In 4.6, you do not have to write a computer program, i.e., ignore the sentence starting with "Demonstrate whether..."

Re: Homework 5, due October 8, 2014.

Posted: Sat Oct 04, 2014 12:50 pm
by ksmith44
I am having a bit of a difficulty with the phase angle plot for 4.3. I am getting a jump after the ratio = 1, and unwrap() is not working. How can I correct that?

Re: Homework 5, due October 8, 2014.

Posted: Sat Oct 04, 2014 3:38 pm
by goodwine
ksmith44 wrote:I am having a bit of a difficulty with the phase angle plot for 4.3. I am getting a jump after the ratio = 1, and unwrap() is not working. How can I correct that?
If the answer is basically right, but only shifted by pi or something, then you don't have to fix it. A couple things that might help are atan2(), plotting it in sections and adding or subtracting pi in the part that needs to be shifted. Again, though, if it's right, but just looks bad, it's not required for you to get the plot to be pretty.

Re: Homework 5, due October 8, 2014.

Posted: Sun Oct 05, 2014 6:49 pm
by ksmith44
Using atan2() fixed it! Thanks.

Re: Homework 5, due October 8, 2014.

Posted: Mon Oct 06, 2014 8:31 pm
by mmulvihill
Could somebody please explain how to properly use atan2()? I'm very confused on what I need to do in order to properly use the function because I do not understand what it does.

Re: Homework 5, due October 8, 2014.

Posted: Mon Oct 06, 2014 8:57 pm
by goodwine
mmulvihill wrote:Could somebody please explain how to properly use atan2()? I'm very confused on what I need to do in order to properly use the function because I do not understand what it does.
It is able to determine which quadrant the inverse tangent function is because it keeps track of the sign of x and y: http://www.mathworks.com/help/matlab/re ... #buct8h0-4

In other words, it can distinguish atan((-x)/(-y)) and atan(x/y), but regular atan() cannot.