HUR All American 17732 Posts user info edit post |
Did anyone get 15-6 on the latest ECE303 hwk. I am really not sure what do to get this MATCrap to work. they never really taught it in my 220 class so alexander has be thrashing me all semester when it comes to MATLAB problems all semester 4/23/2007 4:37:19 PM |
A Tanzarian drip drip boom 10995 Posts user info edit post |
You want to calculate values for E_z (the variable in the line mesh(Xplt...). E_z should a matrix of size (Number of x values) rows by (Number of y values) columns. The value of E_z at each point in the matrix is calculated using the equation for E in the problem. The easiest way to do this is to use nested for loops to increment through all of the x and y values. 4/23/2007 6:03:22 PM |
rastaman8 Veteran 292 Posts user info edit post |
Only 2 lines of coded are needed for this...and no loops. (if you use his code template) 1 line to calculate E 1 line to to make sure E is the correct matrix size
I don't know how to do b) though.
[Edited on April 23, 2007 at 6:18 PM. Reason : ] 4/23/2007 6:17:56 PM |
rastaman8 Veteran 292 Posts user info edit post |
What is up with him giving us 2 EXACT questions from the sample text questions (16-3, 16-4)?
Anyways, any help on 15-6 b) would be appreciated. 4/23/2007 6:39:00 PM |
jbl4me Veteran 222 Posts user info edit post |
how do you do 16-3 and 4? 4/23/2007 6:52:22 PM |
rastaman8 Veteran 292 Posts user info edit post |
^ Did you not even look in the notes? I mean...you can at least try... 4/23/2007 7:08:42 PM |
jbl4me Veteran 222 Posts user info edit post |
i got 16-4...guess im just not in the mood tonight 4/23/2007 7:17:01 PM |
lafta All American 14880 Posts user info edit post |
Quote : | "Only 2 lines of coded are needed for this...and no loops. (if you use his code template) 1 line to calculate E 1 line to to make sure E is the correct matrix size " |
how do you make the correct matrix size?
and did anyone get 16-3 (b), i dont know how to get A
[Edited on April 23, 2007 at 10:14 PM. Reason : .]4/23/2007 10:13:39 PM |
daalians All American 557 Posts user info edit post |
i only needed 1 line o.0? 4/23/2007 10:19:28 PM |
neolithic All American 706 Posts user info edit post |
Only 1 line is needed. Just put in what he gives you for the E-field equation and as your variables use the ones he already has setup. (Hint: look at what variables he uses to plot with) 4/23/2007 10:20:59 PM |
rastaman8 Veteran 292 Posts user info edit post |
I put in E..then meshgrid'ed it like he did to xvlas and yvals...you can use only 1 line too though 4/23/2007 10:35:13 PM |
rastaman8 Veteran 292 Posts user info edit post |
Can anyone help me with b) of 15-6? 4/23/2007 10:35:35 PM |
ninjaOust Starting Lineup 65 Posts user info edit post |
are we suppose to plot the unit vector for 15-6b? well how do u do 15-6b?
also how do we calculate A(amplitude) in 16-3? 4/23/2007 10:35:50 PM |
neolithic All American 706 Posts user info edit post |
For 15-6b I don't know if this is legal, but if you use the Rotate3D button on the window where your function is graphed you can rotate it and see the direction the wave is going. 4/23/2007 10:40:37 PM |
rastaman8 Veteran 292 Posts user info edit post |
I'm having trouble seeing what direction it's going in...even with the 3D rotate...any one else? 4/23/2007 10:48:00 PM |
lafta All American 14880 Posts user info edit post |
Quote : | "I put in E..then meshgrid'ed it like he did to xvlas and yvals...you can use only 1 line too though" |
i did that and it gave me "matrix dimension do not agree"
also any help on 16-3 b would be appreciated4/23/2007 10:48:35 PM |
rastaman8 Veteran 292 Posts user info edit post |
^
E = 5*sin.......(use xvals for x and yvals for y); [E_z] = meshgrid(E);
15-6 b)
Is the wave just flowing in the +x direction? 4/23/2007 10:50:56 PM |
neolithic All American 706 Posts user info edit post |
If you rotate right behind it looks like it is going at a 45 degree angle between the x and y axis to me atleast 4/23/2007 10:53:06 PM |
neolithic All American 706 Posts user info edit post |
If someone knows how to project this onto the XY plane that would would be very helpful. I've searched for 15 mins. and couldn't find anything useful. 4/23/2007 10:55:48 PM |
rastaman8 Veteran 292 Posts user info edit post |
^^ I'm not seeing any type of degree anywhere. 4/23/2007 10:58:01 PM |
neolithic All American 706 Posts user info edit post |
It doesn't actually tell you the angle. Rotate it such that you are looking directly down the y-axis and you will see that it is clearly not going that direction, the same holds true for the x-axis. The easiest thing for me to do was rotate it so that I was looking "down" the direction of propagation (in other words, the peaks are parallel to your point of view). You will then see that it is traveling at a 45 degree angle. Don't believe me? Do a contour map (matlab: contour(E_z)) and you'll see the same thing.
[Edited on April 23, 2007 at 11:06 PM. Reason : i can't spell contour apparently] 4/23/2007 11:04:26 PM |
neolithic All American 706 Posts user info edit post |
Do we have to explicitly solve for A in 16-3b since we have no boundary conditions? 4/23/2007 11:42:24 PM |
ninjaOust Starting Lineup 65 Posts user info edit post |
I just left it with the A and boxed it 4/23/2007 11:44:15 PM |
rastaman8 Veteran 292 Posts user info edit post |
If you look at the sample test questions for 16, 16-3 and 16-4 are the exact same problems as 2 of those...and they leave it as A. 4/23/2007 11:48:02 PM |
rastaman8 Veteran 292 Posts user info edit post |
I'm looking directly down the y axis and x axis...and I can't see anything...maybe I don't know what I'm looking for...is there a math way of doing this? 4/23/2007 11:51:15 PM |
neolithic All American 706 Posts user info edit post |
Well you have to do it at the correct view point to see anything useful. Did you try doing the contour map? 4/23/2007 11:54:01 PM |
rastaman8 Veteran 292 Posts user info edit post |
Yes...and I just get straight lines. 4/23/2007 11:56:47 PM |
neolithic All American 706 Posts user info edit post |
Yeah, thats the image of the propagating wave on the XY plane. If lines ran horizontal to the x-axis that means the wave would be traveling in the y direction. If they were parallel to the y-axis it would be traveling in the x direction. In our case, they are traveling in equal orders of magnitude in the y and x-axises. Look at where each straigh line hits the x and y axis; its at the same spot. So when Y = 4, so does X.
[Edited on April 24, 2007 at 12:03 AM. Reason : sp] 4/24/2007 12:02:21 AM |
rastaman8 Veteran 292 Posts user info edit post |
How do we get a unit vector in the correct direction from all of this though? 4/24/2007 12:05:54 AM |
neolithic All American 706 Posts user info edit post |
If you know that it is going at a 45 degree angle between the x and y axis then |X|ux = |Y|uy. There is only one unit vector that fulfills that..... 4/24/2007 12:12:41 AM |
rastaman8 Veteran 292 Posts user info edit post |
Looking at page 9 of Notes Set 15, it looks like the wave is just propagating in a +y direction. So why wouldn't the unit vector just be 0ux + 1uy + 0uz? 4/24/2007 12:14:39 AM |
rastaman8 Veteran 292 Posts user info edit post |
I still don't understand how you are getting a 45 degree angle...
I think I'm just going to ask some people before class tomorrow. 4/24/2007 12:15:25 AM |
lafta All American 14880 Posts user info edit post |
i think hes saying 0.707ux + 0.707uy is a unit vector in a 45degree angle 4/24/2007 12:26:02 AM |
neolithic All American 706 Posts user info edit post |
^exactly. By definition that unit vector is at a 45 degree angle. I was just trying not to give the final answer explicitly. 4/24/2007 12:27:26 AM |
HUR All American 17732 Posts user info edit post |
i got my shit working and i'm pretty sure the direction of propagation is solely in the +y direction. 4/24/2007 5:02:00 AM |