How to insert a blank column in the matrix
Show older comments
Hi All,
I have a matrix X [1 2 3 4 5]. How do I insert a blank column in between? Eg X = [1 2 3 (blank) 4 5] Thanks,
Accepted Answer
More Answers (1)
Walter Roberson
on 17 Jul 2015
1 vote
Numeric matrices cannot have blank columns. You can put in any constant value, including -inf, inf, and NaN, but not blank.
Cell arrays can have entries which are the empty matrix.
1 Comment
dpb
on 17 Jul 2015
Good point, Walter; I skimmed over the "blank" reading it as zero w/o even thinking of it...but, I guess it was good enough. :)
Categories
Find more on Matrix Indexing 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!