# Homework Help: Measured resonance in RLC -> drawing graphs with Matlab.

1. Mar 28, 2009

### Kruum

Drawing graphs with errors using Matlab.

I'm writing my first serious report, yay!, from the measurements we made with series RLC -circuit. I'm supposed to determine the values of the two coils we used as well as their self-inductanses. We had four different circuits: R, L1 and C in series, R, L2 and C in series, R, L1, L2 and C in series and for the last one we swapped the direction of the current through L2. For each circuit we did six measurements using six different capacitors.

Last edited: Mar 28, 2009
2. Mar 28, 2009

### Kruum

Okay, a new try. I've got the data to make a line, now all I have to do is to use some program, preferably Matlab, to draw the lines.
Here's an example of what I mean:
http://www.aijaa.com/img/b/00738/3901755.jpg [Broken]

And here's the data, where $$\Delta$$ indicates error:
http://www.aijaa.com/img/b/00931/3901739.jpg [Broken]

Last edited by a moderator: May 4, 2017
3. Mar 29, 2009

### MATLABdude

Do you mean drawing in the dashed max / min lines? If you used the MATLAB plot function with two coordinates, it'll draw a line between them. For instance:

>> plot(dependent, independent, [x1, x2], [y1, y2], '-')

(where x1, y1 is a datapoint and x2, y2 is another) would plot your stuff, and draw a dashed line between the points (x1, y1) and (x2, y2).

http://www.mathworks.com/access/helpdesk/help/techdoc/ref/plot.html

4. Mar 29, 2009

### Kruum

Yep, that's the case. So basically I need to draw three different lines in Matlab to achieve the result pictured in my second post?

5. Mar 29, 2009

### MATLABdude

You could use the hold command, or just add some extra arguments to your plot command:

hold
plot(...)
plot(x-coordinates_of_dashed_line_1, y-coordinates_of_dashed_line_1, '-k')
plot(x-coordinates_of_dashed_line_2, y-coordinates_of_dashed_line_2, '-k')
hold

or do it all in one swoop:
plot(x_points, y_points, x-coords_of_dashed_line_1, y_coords_of_dashed_line_1, '-k', x-coords_of_dashed_line_2, y_coords_of_dashed_line_2, '-k')