What does the command A <- A[,-1] do ?
6 次查看(过去 30 天)
显示 更早的评论
What does the command A <- A[,-1] do ?
1 个评论
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
2018-7-25
编辑:Jan
2018-7-25
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!