Matlab - plotting huge amounts of data

AI Thread Summary
To plot 100 data points in MATLAB without manually entering each one, users can create x and y column vectors using commands like "v = start:spacing:end" or "linspace" for generating vectors. Importing data directly from Excel is also suggested as a more efficient method than typing the points into MATLAB. The discussion emphasizes that 100 points is not considered a large dataset, and there are various ways to streamline the plotting process. New users are encouraged to explore these options to simplify their workflow. Overall, leveraging built-in functions and data import features can significantly ease the plotting of multiple data points in MATLAB.
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
 

Similar threads

Replies
1
Views
2K
Replies
10
Views
2K
Replies
6
Views
1K
Replies
8
Views
2K
Replies
5
Views
2K
Replies
1
Views
2K
Back
Top