r66

15 Reputation

2 Badges

12 years, 284 days

MaplePrimes Activity


These are replies submitted by r66

@acer 

i realy appreciat you for guiding me

this is my problem

restart;
with(LinearAlgebra);
with(Student);
with(linalg, genmatrix);
sys := {-.207106781186547524400844362106*lambda[1]+1.20710678118654752440084436211*lambda[2] = 0, 1.20710678118654752440084436211*x[1]-.207106781186547524400844362106*x[2] = 1, -1.61353108866376978508023871599*lambda[1]+1.61353108866376978508023871599*lambda[2]+1.20710678118654752440084436210*x[1]-1.20710678118654752440084436210*lambda[1]-.207106781186547524400844362105*x[2]+.207106781186547524400844362105*lambda[2] = 0, 1.37455258362134694054214893147*lambda[1]-1.37455258362134694054214893147*lambda[2]-1.41421356237309504880168872421*x[1]+1.41421356237309504880168872421*lambda[1]+1.41421356237309504880168872421*x[2]-1.41421356237309504880168872421*lambda[2] = 0, -1.37455258362134694054214893147*x[1]+1.37455258362134694054214893147*x[2]-1.41421356237309504880168872421*x[1]-1.41421356237309504880168872421*lambda[1]+1.41421356237309504880168872421*x[2]+1.41421356237309504880168872421*lambda[2] = 0, -.238978505042422844538089784517*x[1]+.238978505042422844538089784517*x[2]+1.20710678118654752440084436210*x[1]+1.20710678118654752440084436210*lambda[1]-.207106781186547524400844362105*x[2]-.207106781186547524400844362105*lambda[2] = 0};
A := genmatrix(sys, [x[1], x[2], lambda[1], lambda[2]]);

b := `<,>`(1, 0, 0, 0, 0, 0);
           Vector[column](%id = 18446744074375951654)
Y := LeastSquares(A, b);
Error, (in LinearAlgebra:-LeastSquares) invalid input: LinearAlgebra:-LeastSquares expects its 1st argument, A, to be of type Matrix but received set(equation)


i dont know how to solve this error

@Thomas Richard  I was very thanksful you are considering my problem

@acer  I greatly appreciate your kind word

@Kitonum 

i appreciate your help. excusme i have another question would you please tell me how i can use the above output in fact , i have 2 vectors that their component are x[i]and u[i].for example X:=[x[1],x[2],...x[n]] and U:=[u[1],u[2],..u[n]].

i like to assign these output to the vector X&U then use inner product.

thx.

i uplaod the example of my code for yo

 

Download example.mw

Page 1 of 1