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

18 ビュー (過去 30 日間)
Axa Baby
Axa Baby 2016 年 2 月 17 日
回答済み: Mukhtar Ullah 2017 年 8 月 15 日
trig= -1*Y(:,1);
s= -1*Y(:,2);

回答 (2 件)

Mukhtar Ullah
Mukhtar Ullah 2017 年 8 月 15 日
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 2016 年 2 月 17 日
編集済み: Stephen23 2016 年 2 月 17 日

カテゴリ

Help Center および File ExchangeOperators and Elementary Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by