How come when i generated this command x=[-2:0.1:3] although the value does show but why on top there is (e.g columns 46 through 51 is there anyway to remove it?)
2 views (last 30 days)
Show older comments
x=[-2:0.1:3]
x =
Columns 1 through 15
-2.0000 -1.9000 -1.8000 -1.7000 -1.6000 -1.5000 -1.4000 -1.3000 -1.2000 -1.1000 -1.0000 -0.9000 -0.8000 -0.7000 -0.6000
Columns 16 through 30
-0.5000 -0.4000 -0.3000 -0.2000 -0.1000 0 0.1000 0.2000 0.3000 0.4000 0.5000 0.6000 0.7000 0.8000 0.9000
Columns 31 through 45
1.0000 1.1000 1.2000 1.3000 1.4000 1.5000 1.6000 1.7000 1.8000 1.9000 2.0000 2.1000 2.2000 2.3000 2.4000
Columns 46 through 51
2.5000 2.6000 2.7000 2.8000 2.9000 3.0000
0 Comments
Answers (1)
Guillaume
on 4 Sep 2018
No, this is the way matlab displays vector/matrices on the command line and there is no option to change that. More importantly, why do you care? It's only cosmetics.
Talking of extra clutter, the [] around your -2:0.1:3 are totally unnecessary.
x = -2:0.1:3
would achieve the same.
3 Comments
Guillaume
on 4 Sep 2018
1) How is this related to your original question?
y = (x+2).*(x.^2+3)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!