susan_likes_math

73 Reputation

4 Badges

18 years, 217 days

MaplePrimes Activity


These are questions asked by susan_likes_math

Hello, all! I have a linear system of real numbers. I copied the example in the tutorial for using LinearSolve and converted my matrix to a float: with(LinearAlgebra); my_solve := proc(A::Matrix) local sz, local_A, B, sol; sz := Dimension(A); local_A := Matrix(A, datatype=float); B := Vector(1...sz[1], 1); sol := LinearSolve(local_A, B); end proc; And when it solved, it got the wrong answer!! It would produce a solution that simply didn't work. When I removed the float conversion step, and just used my original matrix, it worked perfectly. I would love to understand this better... is it because of rounding?
Hello! I would like to do something that I really think should be simple. Suppose I have a polynomial P := x^2 + y If I want to evaluate it at the point [1,2], I could say: eval(x=1,y=2,P); But suppose that I didn't know the form the variables in the polynomial would take. Or suppose that I knew they were of the form x1,x2,x3,...,xn. Given a vector of size n, how can I evaluate my polynomial at that point? Thanks! Susan
1 2 Page 2 of 2