Matrix, vector, plot, combination

I have this little code: x=(1:1:50); X=x'; Y=[101:1:150;151:1:200;]; yy=Y' plot(X, yy(:,1),'-or'); hold on plot(X(:,1)(1:10:end), yy(:,2)(1:10:end), 'or');
the last line 'plot(X(:,1)(1:10:end), yy(:,2)(1:10:end), 'or'); is not working of course it is possible to do like aaa=yy(:,2) and the new plot(X(:,1)(1:10:end), aaa(1:10:end), 'or'); is working fine but my question is if exist a solution without doing this.

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2015년 7월 10일

0 개 추천

plot(X(1:10:end),Y(2,1:10:end)')

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

질문:

2015년 7월 10일

답변:

2015년 7월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by