norm square

42 vues (au cours des 30 derniers jours)
Janet
Janet le 23 Fév 2012
How to implement equation:
CRE=||Pu||^2
P is a matrix

Réponse acceptée

Wayne King
Wayne King le 23 Fév 2012
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 commentaire
Jaromir Kabelac
Jaromir Kabelac le 3 Mar 2020
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

Connectez-vous pour commenter.

Plus de réponses (1)

Jonathan Sullivan
Jonathan Sullivan le 23 Fév 2012
Have you tried
CRE = norm(P)^2;
help norm
doc norm

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by