Clear Filters
Clear Filters

Info

This question is closed. Reopen it to edit or answer.

two vectors graph on same x-axis(time) point.

1 view (last 30 days)
Raghavendra Reddy P
Raghavendra Reddy P on 1 Jun 2015
Closed: Walter Roberson on 1 Jun 2015
i have 2 vectors x and y
>> t=1:10;
>> x=[1 4 3 -5 2.5 18 11 27 5 7];
>> y=[1 3.1 2.85 26 6.9];
>> plot(t,x)
which gives x plot, i wanted to draw y graph on existing plot on same t-axis points(1:10) such that elements value of y which matches x elements value should be drawn on t-points. for example y1=x1,y2=x3,y3=x5,y4=x8,y5=x10 are almost equal and these y values should plot on t values of t=[1 3 5 8 10] which was already there is x-plot i.e t=1:10

Answers (0)

This question is closed.

Community Treasure Hunt

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

Start Hunting!