User not logged in - login - register
Home Calendar Books School Tool Photo Gallery Message Boards Users Statistics Advertise Site Info
go to bottom | |
 Message Boards » » ECE 303 matlab help Page [1]  
HUR
All American
17732 Posts
user info
edit post

Was any one able to solve homework 2-6. We are supposed to use Matlab to solve a lossless transmission line input for a cosine segment and plot this using matlab.

maybe i daydreamed when he briefly put something on the board but NO where in the notes or the problem sets does he explain how to do this using MATLAB

1/29/2007 3:48:54 PM

A Tanzarian
drip drip boom
10995 Posts
user info
edit post

I just used Matlab to mimic the approach taken in 2-4. You don't need any special commands, just a matrix and some for loops.

1/29/2007 4:06:46 PM

jbl4me
Veteran
222 Posts
user info
edit post

I still don't really understand the question. For 2-6 (and 2-5) you are looking at the wave at a certain point in time. So would you use for loops to make the proper matrix, then plot at the values of M requested?

Thanks

1/29/2007 5:47:27 PM

A Tanzarian
drip drip boom
10995 Posts
user info
edit post

Pretty much. Figure out how big the matrix should be (M x N) and create an all zero matrix. Fill in the initial conditions and then use two nested loops to fill in the rest of the matrix. For the plots, just use the row that corresponds to the time you're interested in (e.g. M = 8 for 8 nsec).

The only tricky part is that the matrix should have dimensions of M by (N + 1) so that there is a v(m, n+1) term available when filling in the Nth column. When doing the plots in 2-6 you can just ignore the N+1 column. For problem 2-7 you're going to have to get rid of the N+1 column.

1/29/2007 7:32:04 PM

HUR
All American
17732 Posts
user info
edit post

i honestly do not remember how to do all that stuff using matlab. its been a year and right now i am clueless.

1/29/2007 10:03:48 PM

rastaman8
Veteran
292 Posts
user info
edit post

Can someone explain the steps to solving 2-4, so that I can figure out how to solve 2-6 as well?

[Edited on January 29, 2007 at 11:03 PM. Reason : ]

1/29/2007 10:59:06 PM

lafta
All American
14880 Posts
user info
edit post

fill in the matrix from time 3 to 9 using the x(t) equation, the variable is m,
then shift that line on like it has in the examples

did anyone get an error plotting the 3-d graph. my error says matrix must be square ...

1/29/2007 11:04:37 PM

rastaman8
Veteran
292 Posts
user info
edit post

^ Is m both m and delta t? Or is delta t 2e-9?

1/29/2007 11:07:24 PM

lafta
All American
14880 Posts
user info
edit post

tm = m*delta t

m is just the index, so you have an m x n array,

you first fill column 1 and row 3 to 9 with x(t) as it is specified just plug in the m's
the each value shifted one column right and one row down, diagonally
and repeat over and over

1/29/2007 11:09:39 PM

rastaman8
Veteran
292 Posts
user info
edit post

^ Thank you so much.

1/29/2007 11:13:56 PM

HUR
All American
17732 Posts
user info
edit post

does anyone have any sample matlab code form say 303, 301, or even 220. I would go to office hours to seek help but professor alexander's office hours is during one of my classes. I tried emailing the professor but he never responded. I am sure either way he would have some smart remark about why he wouldn't help.

2/5/2007 1:39:36 PM

sober46an3
All American
47925 Posts
user info
edit post

http://www.mathworks.com/matlabcentral/ is a matlab user community and a great resource for finding code and seeing how people do things in matlab. i use it all the time.

[Edited on February 5, 2007 at 1:42 PM. Reason : d]

2/5/2007 1:42:20 PM

 Message Boards » Study Hall » ECE 303 matlab help Page [1]  
go to top | |
Admin Options : move topic | lock topic

© 2024 by The Wolf Web - All Rights Reserved.
The material located at this site is not endorsed, sponsored or provided by or on behalf of North Carolina State University.
Powered by CrazyWeb v2.39 - our disclaimer.