I want to use the L0 norm ?

39 visualizzazioni (ultimi 30 giorni)
Nora Khaled
Nora Khaled il 30 Apr 2019
Risposto: Bruno Luong il 6 Ott 2020
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 ?

Risposta accettata

Nora Khaled
Nora Khaled il 1 Mag 2019
I used sum(x>0).
  1 Commento
LANTIAN WEI
LANTIAN WEI il 6 Ott 2020
Modificato: LANTIAN WEI il 6 Ott 2020
sum(abs(x)>0) will be better

Accedi per commentare.

Più risposte (1)

Bruno Luong
Bruno Luong il 6 Ott 2020

Categorie

Scopri di più su Get Started with MATLAB in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by