Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help please in matlab -- plotting a D'Alembert wave equation

  1. Jan 6, 2015 #1
    Can someone please help me in plotting a D'Alembert wave equation solution in MATLAB? I am so confused as how to plot it in MATLAB

    I need to plot a graph like the one below

    upload_2015-1-6_7-24-35.png
     
  2. jcsd
  3. Jan 6, 2015 #2

    jedishrfu

    Staff: Mentor

  4. Jan 6, 2015 #3
  5. Jan 6, 2015 #4

    jedishrfu

    Staff: Mentor

    It talks about plotting multiple lines.

    If you're looking for more info like generating the data for plot then you'll need to find another tutorial.
     
  6. Jan 6, 2015 #5
    No man I already know how to plot multiple lines....its on how to generate the data actually
     
  7. Jan 6, 2015 #6

    Mark44

    Staff: Mentor

    Show us what you have already tried. Be advised, however, that we're not going to do your work for you...
     
  8. Jan 6, 2015 #7
    What do you want to see? I have typed all sorts of commands in MATLAB getting nothing as a result so I have nothing to show you.

    I tried x = [-1 -0.5 0 0.5...4] then did y = [0,0,0 placed 2 for all the x values in the picture that had y as 2] then did plot(x,y) but got some stupid graph

    anyways I don't know how to use PDE commands in MATLAB unless someone wants to be generous and teach me...I am good at coding and maths I swear! I will learn fast.
     
  9. Jan 6, 2015 #8

    Mark44

    Staff: Mentor

    Show us what you have tried.
    PDE? Partial differential equations?
     
  10. Jan 7, 2015 #9

    DrClaude

    User Avatar

    Staff: Mentor

    To get straigth veritcal lines (by hand), you need to double the points at which the lines appear. For instance, you need two points at x = 0.5, one with y=0 followed by one with y=2.
     
  11. Jan 7, 2015 #10

    kreil

    User Avatar
    Gold Member

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Help please in matlab -- plotting a D'Alembert wave equation
  1. Matlab help please! (Replies: 3)

  2. Help in MATLAB please (Replies: 1)

  3. Help in MATLAB please (Replies: 22)

  4. Matlab Help please (Replies: 4)

Loading...