Assign values in a sistem

This is what I ve to solve...It's simple!And it works, but if I write:

>fsolve({2*x + y = 1, x - y  = 2}, {x, y});

>y;

it writes y and to the value that solve the sistem!Did you understand?How can I do it?

 

>fsolve({2*x + y = 1, x - y  = 2}, {x, y});

assign

I guess you are looking for the assign command:

sol := fsolve({2*x + y = 1, x - y  = 2}, {x, y});

assign(sol);  # note that this produces no output!

y;  # outputs -1.

thank youuuu!!!

thank youuuu!!!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}