MATLAB Answers

huda nawaf

how plot sequences?

Asked by huda nawaf
on 14 May 2012

hi, I have sum of sequences of integer values, i need to draw it to see the similarity among them.

for ex. x= [1 2 5 6 7 0 0; 2 3 4 9 1 8 6 ; 56 23 89 3 0 0]; i used : plot(1:7,x(1:3,1:7))

but this is nor give me clear relations among these sequences

what is the best way to do that? thanks in advance




No products are associated with this question.

1 Answer

Answer by Honglei Chen
on 14 May 2012
 Accepted answer

Are you trying to compare different rows? If so, use


or simply


  1 Comment

Right, notice the transpose that Honglei used. When a matrix of y values are given to plot, it plots down the columns, so if your data is by rows, you need to transpose it.

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!