Matlab - plotting huge amounts of data

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 2K views
eurekameh
Messages
209
Reaction score
0
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?
 
Physics news on Phys.org
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.
 
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.
 
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.
 
eurekameh said:
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.

Where do these data points reside right now?
 
If you have those datapoints in Excel you could just import them into MATLAB