0

I have 165545*1 double and 1*351 double variables. I want to put 165545 * 1 on y axis and 1*351 on x axis using plot(x,y) or scatter(x,y).

Sam
  • 53
  • 5
  • Every point in 2D include (x,y). – Mendi Barel Aug 12 '17 at 07:35
  • Every point from 1*351 maybe include many points from 165545*1 – Sam Aug 12 '17 at 07:38
  • 1
    Do you have a func(x, y) that you want to plot against? Cause right now it makes no sense. – crazyGamer Aug 12 '17 at 09:17
  • Possible duplicate of [How to plot two variables with different size length on matlab?](https://stackoverflow.com/questions/45645185/how-to-plot-two-variables-with-different-size-length-on-matlab) – beaker Aug 12 '17 at 14:43
  • Please do not post duplicate questions. If you are not getting relevant answers to your question, clarify your question and respond to the suggestions given to you in the comments. – beaker Aug 12 '17 at 14:44

1 Answers1

1

You can select random x' to build xi vector with same number of elements as y:

idx=randi([1,length(x)],1,length(y));
xi=x(idx);
scatter(xi,y)
Mendi Barel
  • 3,350
  • 1
  • 23
  • 24