I want to use the L0 norm ?

조회 수: 40 (최근 30일)
Nora Khaled
Nora Khaled 2019년 4월 30일
답변: Bruno Luong 2020년 10월 6일
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 ?

채택된 답변

Nora Khaled
Nora Khaled 2019년 5월 1일
I used sum(x>0).
  댓글 수: 1
LANTIAN WEI
LANTIAN WEI 2020년 10월 6일
편집: LANTIAN WEI 2020년 10월 6일
sum(abs(x)>0) will be better

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Bruno Luong
Bruno Luong 2020년 10월 6일
nnz(x)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by