What does the command A <- A[,-1] do ?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Jayan Thiruthiyil
am 25 Jul. 2018
Kommentiert: Jayan Thiruthiyil
am 27 Jul. 2018
What does the command A <- A[,-1] do ?
1 Kommentar
Adam
am 25 Jul. 2018
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!
Akzeptierte Antwort
Jan
am 25 Jul. 2018
Bearbeitet: Jan
am 25 Jul. 2018
I have no idea, most of all because it is not a MATLAB command.
- There is no "<-" operator in Matlab
- You cannot apply an indexing by square brackets, so "A[]" is not recognized
- 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.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!