MATLAB: I want to use the L0 norm

functionmatlab functionnorm

Hi !
I was trying to use the function norm(v,p). but p takes value from 1 to inf.
How can I calulate the zero norm ?

Best Answer

I used sum(x>0).
Related Question