Measured resonance in RLC -> drawing graphs with Matlab.

AI Thread Summary
The discussion focuses on using Matlab to graph data from measurements taken with a series RLC circuit. The user is working on a report to determine the values of two coils and their self-inductances, having conducted multiple measurements with different capacitors across four circuit configurations. They seek guidance on plotting lines in Matlab, specifically for dashed max/min lines. Participants suggest using the plot function with specific coordinates and the hold command to overlay multiple lines in a single graph. The conversation emphasizes the importance of accurately representing the data visually in the report.
Kruum
Messages
217
Reaction score
0
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:
Physics news on Phys.org
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


And here's the data, where \Delta indicates error:
http://www.aijaa.com/img/b/00931/3901739.jpg
 
Last edited by a moderator:
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
 
MATLABdude said:
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.

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?
 
Kruum said:
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?

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')
 
Back
Top