What is wrong of this Maple worksheet?# Computation - 科学计算
z*e
1 楼
> restart;
> with(LinearAlgebra):
> Sf:=proc(m,n)
> local A,U,Vt,S;
> A := RandomMatrix(m,n,outputoptions=[datatype=float]);
> U,Vt := SingularValues(A, output=['U','Vt']);
> return U;
> end proc:
> Sf(5,3);
Error, (in LinearAlgebra:-LA_Main:-SingularValues) invalid output (U)
specified
> with(LinearAlgebra):
> Sf:=proc(m,n)
> local A,U,Vt,S;
> A := RandomMatrix(m,n,outputoptions=[datatype=float]);
> U,Vt := SingularValues(A, output=['U','Vt']);
> return U;
> end proc:
> Sf(5,3);
Error, (in LinearAlgebra:-LA_Main:-SingularValues) invalid output (U)
specified