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

조회 수: 6 (최근 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.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by