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 problem

  1. Oct 16, 2007 #1
    Im trying to plot a graph with eror bars for two 1d arrays. But for some reason matlab wont let me do it. Can you please help me as quickly as possible as im currectly sitting in a computer lab and am very tired.

    My code is:

    W = 10:10:60;
    V1 = [0.103,0.223,0.351,0.436,0.555,0.664];
    e = (+-0.05);

  2. jcsd
  3. Oct 24, 2007 #2


    User Avatar
    Science Advisor
    Homework Helper

    your problem is with variable 'e', it must be a vector of same length as W and V1. It is okay to specify constants in a vector, but +- is not a valid prefix. Leaving off the +-, the plot will give a symmetric error-bar 2e long.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Matlab graphing problem
  1. Matlab graph (Replies: 14)