MATLAB Answers

removing zeros from column

37 views (last 30 days)
sermet
sermet on 4 Aug 2015
Answered: Al Dente on 4 Aug 2015
A=[1;2;2;0;0;3;0;0];
%I need to remove all "0" in A matrix then I need to create a matrix without "0" like; [1;2;2;3]

  0 Comments

Sign in to comment.

Accepted Answer

Al Dente
Al Dente on 4 Aug 2015
A(A==0) = []

  0 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!