필터 지우기
필터 지우기

norm square

조회 수: 30 (최근 30일)
Janet
Janet 2012년 2월 23일
댓글: Jaromir Kabelac 2020년 3월 3일
How to implement equation:
CRE=||Pu||^2
P is a matrix

채택된 답변

Wayne King
Wayne King 2012년 2월 23일
Is Pu a vector resulting from multiplying a vector by a matrix
P = randn(2,2);
u = randn(2,1);
norm(P*u,2)
  댓글 수: 1
Jaromir Kabelac
Jaromir Kabelac 2020년 3월 3일
This is not true.
norm(x, 2)
is the same as
norm(x)
and calculates the 2-norm (or Euclidian norm) of x, which could be denoted as , or usually just as .
What you probably want is the square of the norm, hence
norm(x)^2

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

추가 답변 (1개)

Jonathan Sullivan
Jonathan Sullivan 2012년 2월 23일
Have you tried
CRE = norm(P)^2;
help norm
doc norm

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by