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

Matlab graphing/plotting problem

  1. Mar 13, 2008 #1
    1. The problem statement, all variables and given/known data

    i have 4 points,
    (8,0)
    (4,-4)
    (-4,4)
    (-8,0)
    i want to draw a graph of this on matlab so that the first to points are joined, the last two points are joined, but i want it on the same graph.
    how do i do this? what's the command?
    thank you

    2. Relevant equations



    3. The attempt at a solution
     
  2. jcsd
  3. Mar 13, 2008 #2
    plot([4 8], [-4 0])
    plot([-8 -4], [0 4])

    remember to hold graphs if you are entering commands individually.
     
  4. Mar 13, 2008 #3
    thank you!!!!!!!!!!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Matlab graphing/plotting problem
Loading...