What does the command A <- A[,-1] do ?

7 ビュー (過去 30 日間)
Jayan Thiruthiyil
Jayan Thiruthiyil 2018 年 7 月 25 日
コメント済み: Jayan Thiruthiyil 2018 年 7 月 27 日
What does the command A <- A[,-1] do ?
  1 件のコメント
Adam
Adam 2018 年 7 月 25 日
It produces this by default
Undefined function or variable 'A'.
Or this if A is defined as a double
Error: "A" was previously used as a variable, conflicting with its use here as the name of a function or
command.
See "How MATLAB Recognizes Command Syntax" in the MATLAB documentation for details.
or probably a variety of other error messages too!

サインインしてコメントする。

採用された回答

Jan
Jan 2018 年 7 月 25 日
編集済み: Jan 2018 年 7 月 25 日
I have no idea, most of all because it is not a MATLAB command.
  1. There is no "<-" operator in Matlab
  2. You cannot apply an indexing by square brackets, so "A[]" is not recognized
  3. Indexing works with round parentheses: "A()", but then the index ",-1" cannot start with a command and cannot be negative.
So this is simply not Matlab. The answer is: It produces an error.
  1 件のコメント
Jayan Thiruthiyil
Jayan Thiruthiyil 2018 年 7 月 27 日
Thank you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by