difference in brackets (, [ or no brackets?
Show older comments
I tried typing in a simple array
x= 0:2:10
x=[0:2:10]
x=(0:2:10)
they all give me the same answer whats the difference then?
Accepted Answer
More Answers (2)
Image Analyst
on 18 Oct 2016
0 votes
No difference - they're ignored. Only difference would be if you used braces {}, which would turn the result into a "cell". See the FAQ for info on that: http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F
ogaba-oche david
on 10 May 2023
0 votes
(a+A)/2 keeps telling error, when a = 8 and A = -2
1 Comment
Not for me.
a = 8;
A = -2;
(a+A)/2
Please show us the full and exact text (everything in red) of the error message you received when you performed that operation. You may also want to show us more information about the variables a and A.
whos a A
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!