Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello Alvaro,
Actually, that is the point. I think that's the problem of the symbolic engine. The first one gives the symbolic result
(-5*t)*mat(el(X,1),el(X,2),2,1)+mat(el(X,2)*el(X,1)^2,el(X,2)^2*el(X,1),2,1)=mat(-5*el(X,1),-5*el(X,2),2,1)*t+mat(el(X,2)*el(X,1)^2,el(X,2)^2*el(X,1),2,1)
and the result is not a vector, therefore length() does not work. The second one actually give you the vector symbolically
(-5)*mat(el(X,1)*t,el(X,2)*t,2,1)+mat(el(X,2)*el(X,1)^2,el(X,2)^2*el(X,1),2,1)=mat(el(X,1)*(-5*t+el(X,2)*el(X,1)),el(X,2)*(-5*t+el(X,2)*el(X,1)),2,1)
Maybe the solution would be to say in advance what the variable t was - either scalar, vector or matrix. Something like "assume". If SMath assumed that t was a scalar, it should behave in accordance to that and give you the second correct result.
Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |