what does y(:,1) means if y is a matrix ?

17 vues (au cours des 30 derniers jours)
Axa Baby
Axa Baby le 17 Fév 2016
trig= -1*Y(:,1);
s= -1*Y(:,2);

Réponses (2)

Mukhtar Ullah
Mukhtar Ullah le 15 Août 2017
If you define a bidimensional array y, and you want to access all its elements on the first column: y(:,1) will do it. If you want to access to all the elements of the fift row: y(5,:) is the syntax you have to use. The colon means: take all the elements along the specified dimension. --Franco 18:36, 29 September 2006 (PDT)

Stephen23
Stephen23 le 17 Fév 2016
Modifié(e) : Stephen23 le 17 Fév 2016

Catégories

En savoir plus sur Operators and Elementary Operations dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by