Matrix, vector, plot, combination

1 vue (au cours des 30 derniers jours)
Ionut  Anghel
Ionut Anghel le 10 Juil 2015
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.

Réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 10 Juil 2015
plot(X(1:10:end),Y(2,1:10:end)')

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by