1. Limited time only! Sign up for a free 30min personal 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!

Matlab - plotting huge amounts of data

  1. Jan 27, 2013 #1
    I have a table of 100 data points. I want to plot this on Matlab. Is there any other way for me to do this other than making an array for each column and then plotting it?
     
  2. jcsd
  3. Jan 27, 2013 #2

    lewando

    User Avatar
    Gold Member

    First off, 100 points is not huge. Not sure what you mean by "making an array for each column". What have you tried? Show what you tried.
     
  4. Jan 27, 2013 #3
    Sorry for the confusion. I meant making an x and y column vector and then just plotting them with each other. I know 100 points is not huge, but when typing in these 100 data points directly into Matlab, it is a lot.

    For example,
    x = [x1 x2 x3 ...]';
    y = [y1 y2 y3 ...]';
    plot(x,y);

    where x1, x2, y1, y2 are the discrete data points, and if I have something like a hundred of these, it can seem like a lot. What I'm trying to ask is if there is another way that I can plot x vs. y without having to directly type all of these data points into Matlab.
     
  5. Jan 28, 2013 #4
    Not sure if I am right, but I might give it a try. I am new to MATLAB.

    what if you try something like :

    v = start : spacing : end

    where v is the vector containing the starting value, increment value (optional) and finally the end value.

    example : v = 1:10 % this will create a vector from 1 to 10

    v = 1:2:10 % this will give 1 3 5 7 9

    You might also type "help linspace" in your matlab command window, maybe that command is useful to you.

    Good luck.
     
  6. Jan 28, 2013 #5

    rollingstein

    User Avatar
    Gold Member

    Where do these data points reside right now?
     
  7. Jan 28, 2013 #6
    If you have those datapoints in Excel you could just import them into MATLAB
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook