Problem 2661. Change Vector Value
Solution Stats
Problem Comments
Solution Comments
-
3 Comments
Interesting. [d==1] has a Cody size one greater than (d==1). Any thoughts as to why?
The brackets are the operation "conatenate elements" so it is interpreted as an extra operation. The expression [1:10] has the same meaning (result) as (1:10) but in the first case you have done an extra operation (not necessary in this case). On the same way you can use [1 5] but if you use (1 5) you become an error because there is no concatenation with simple parenthesis.
Nice. Thanks for the explanation, J.R.
Problem Recent Solvers81
Suggested Problems
-
Find the two most distant points
2136 Solvers
-
370 Solvers
-
Back to basics 25 - Valid variable names
303 Solvers
-
The Answer to Life, the Universe, and Everything
443 Solvers
-
Is this triangle right-angled?
4289 Solvers
More from this Author21
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!