Plotting arrays as x and y axis.

65 views (last 30 days)
ABHISEKH MUKHERJEE
ABHISEKH MUKHERJEE on 12 Jan 2014
Commented: Dhrumil on 21 Nov 2022
I am having two arrays containing about 1000 datas. I have entered the datas using for loop. Now i need to plot the graph with one array as x axis and one array as y axis . How to do it

Answers (1)

Mischa Kim
Mischa Kim on 12 Jan 2014
Edited: Mischa Kim on 12 Jan 2014
Are they both 1000x1 (or 1x1000) arrays? If yes, you can simply use
plot(x,y)
where x and y are the two arrays. If no, I need more info on the size of the arrays and on what exactly you would like to plot.
  9 Comments
Dhrumil
Dhrumil on 21 Nov 2022
Graph an array of size 10x1 with random values plot the line of the array change the 3 element of the array with 10 and line color changed array with line doing red and the same plot
Dhrumil
Dhrumil on 21 Nov 2022
Graph an array of size 10x1 with random values plot the line of the array change the 3 element of the array with 10 and line color changed array with line doing red and the same plot

Sign in to comment.

Categories

Find more on Creating and Concatenating Matrices in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!