1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Measured resonance in RLC -> drawing graphs with Matlab.

  1. Mar 28, 2009 #1
    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. jcsd
  3. Mar 28, 2009 #2
    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 [tex]\Delta[/tex] indicates error:
    http://www.aijaa.com/img/b/00931/3901739.jpg [Broken]
     
    Last edited by a moderator: May 4, 2017
  4. Mar 29, 2009 #3

    MATLABdude

    User Avatar
    Science Advisor

    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
     
  5. Mar 29, 2009 #4
    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?
     
  6. Mar 29, 2009 #5

    MATLABdude

    User Avatar
    Science Advisor

    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')
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Measured resonance in RLC -> drawing graphs with Matlab.
Loading...