deleting an element from a Matrix without changing its dimensions?
Show older comments
i am working on Matlab R2008a;
to apply the EM learning for BN i need to have a matrix with some empty element in it; for example: A = [ 1 2 3 4 5 6 7 8 9] i want to delete the element '5'; the code:
A (2,2) = []; will convert A to a one raw vector ?! i want to keep it (3x3) matrix but the element (2,2) is simply empty thank you.
1 Comment
TAB
on 10 Jul 2012
Your A = [ 1 2 3 4 5 6 7 8 9] is already one row vector.
Accepted Answer
More Answers (0)
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!