MATLAB: How to delete particular values in this matrix

matrixmatrix arraymatrix manipulation

[a b]=[ 0.5708 0.0755 0 0 0 0 0
0 0 161.5569 0 84.9907 35.0193 17.0669];
i don't want the values before this
" 0
0 "
and my answer should be like this..
[c d]=[ 0 0 0 0
0 84.9907 35.0193 17.0669];

Best Answer

To solve your (constantly changing) requirement stated in your last comment to my original answer, try this code:
allR111 = [allR11;allR21];
Y3 = true(1,size(allR111,2));
Y3(1:find(abs(allR111(1,:))<1e-6,1,'last')) = false;
Y3(1:find(abs(allR111(2,:))<1e-6,1,'last')) = false;
allR111(:,Y3)