Matrix normalized, Matrix norm

9 vistas
Ir al primer mensaje no leído

Massimo Biber

no leída,
14 jul 2016, 10:07:53 a.m.14/7/2016
para sympy
>>> from sympy import *
>>> v=symbols('v:3',real=True);v
(v0, v1, v2)
>>> V=Matrix(v);V
Matrix([
[v0],
[v1],
[v2]])
>>> U=V.normalized()
>>> U
Matrix([
[v0/sqrt(v0**2 + v1**2 + v2**2)],
[v1/sqrt(v0**2 + v1**2 + v2**2)],
[v2/sqrt(v0**2 + v1**2 + v2**2)]])
>>> U.norm()
sqrt(v0**2/(-v0**2 - v1**2 - v2**2) + v1**2/(-v0**2 - v1**2 - v2**2) + v2**2/(-v0**2 - v1**2 - v2**2))
>>> _.simplify()
I
>>> 

Why is U.norm() NOT equal 1?
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos