Respuesta aceptada

Wayne King
Wayne King el 23 de Feb. de 2012

1 voto

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 comentario

Jaromir Kabelac
Jaromir Kabelac el 3 de Mzo. de 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

Iniciar sesión para comentar.

Más respuestas (1)

Jonathan Sullivan
Jonathan Sullivan el 23 de Feb. de 2012

1 voto

Have you tried
CRE = norm(P)^2;
help norm
doc norm

Etiquetas

Aún no se han introducido etiquetas.

Preguntada:

el 23 de Feb. de 2012

Comentada:

el 3 de Mzo. de 2020

Community Treasure Hunt

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

Start Hunting!

Translated by