| Author |
Comment/Response |
Pedro Silva
|
05/30/08 3:35pm
Hi!
I am programming with mathematica for the first time for a numerical methods project. I really don't know much about the functions mathematica have, i just think in C and try to export things to mathematica. In the end, I'm having a little troule with an augmented matrice.
I'm joining TR and J into Aux, where TR is the transpose of a vector and J is the jacobi matrix of a 2D non-linear equation. I need to join them and use the Gauss elimintion method (asked by the professor).
My problem is that my Aux matrice is 2D, x and y, and I wanted to assign a P to x and y, where P is a vector containing the value of x an y.
When I try the Aux[P] it goes crazy :S
Code:
Aux = ReplacePart[Aux, {1, 3} -> tr[[1, 1]]];
Aux = ReplacePart[Aux, {2, 3} -> tr[[2, 1]]];
Aux = ReplacePart[Aux, {1, 1} -> J[[1, 1]]];
Aux = ReplacePart[Aux, {1, 2} -> J[[1, 2]]];
Aux = ReplacePart[Aux, {2, 1} -> J[[2, 1]]];
Aux = ReplacePart[Aux, {2, 2} -> J[[2, 2]]];
Aux = -4+4 x -6 y^2 1-4 x+2 x^2-2 y^3
4 x^3 4+16 y^3 -4+x^4+4 y+4 y^4
Aux[P] is just Aux multiplied by the vector P. How can I make mathematica recognise P as the values os x and y?
Can someone help please?
URL: , |
|