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

8 vues (au cours des 30 derniers jours)
Jayan Thiruthiyil
Jayan Thiruthiyil le 25 Juil 2018
What does the command A <- A[,-1] do ?
  1 commentaire
Adam
Adam le 25 Juil 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!

Connectez-vous pour commenter.

Réponse acceptée

Jan
Jan le 25 Juil 2018
Modifié(e) : Jan le 25 Juil 2018
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 commentaire
Jayan Thiruthiyil
Jayan Thiruthiyil le 27 Juil 2018
Thank you

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by