I want to use the L0 norm ?

39 vues (au cours des 30 derniers jours)
Nora Khaled
Nora Khaled le 30 Avr 2019
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 ?

Réponse acceptée

Nora Khaled
Nora Khaled le 1 Mai 2019
I used sum(x>0).
  1 commentaire
LANTIAN WEI
LANTIAN WEI le 6 Oct 2020
Modifié(e) : LANTIAN WEI le 6 Oct 2020
sum(abs(x)>0) will be better

Connectez-vous pour commenter.

Plus de réponses (1)

Bruno Luong
Bruno Luong le 6 Oct 2020

Catégories

En savoir plus sur Get Started with MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by