MATLAB: Delete zero values in works pace variable

delete valuework space variable

Hi, How to delete zero values in the workspace variable and save the updated value (without zero) into another variable?
Great Thanks

Best Answer

a=[1 2 3 0 4 5 0 6 7]
a =
1 2 3 0 4 5 0 6 7
>> a=a(a>0)
a =
1 2 3 4 5 6 7
Related Question