I have this problem
I have to solve something like this
for i to 17 do
solucion[i] := solve({item3[i], item4[i]}, {x, y})
end do
and I obtain in the answer for example
solucion[1] = {x=2,y=3}
solucion[2] = {x=3,y=4}
and I would like to create a vector containing all the values for x and all the values for y like x[1]=2 x[2]=3 and so on
How can I do it. and How can I export that to an excel or a text file???
Thanks!
there are many ways
> solucion[1] := {x=2,y=3};
> solucion[2] := {x=3,y=4};
> solucion[3] := {x=2,y=0};
solucion[1] := {x = 2, y = 3}
solucion[2] := {x = 3, y = 4}
solucion[3] := {x = 2, y = 0}
> for i from 1 to 3 do
> x[i] := subs(solucion[i],x);
> y[i] := subs(solucion[i],y);
> end do;
x[1] := 2
y[1] := 3
x[2] := 3
y[2] := 4
x[3] := 2
y[3] := 0
> x[2];
3
To export your file
Here is how to expor to a file
> ExportMatrix("D:/Data/Data6/My_Filea.txt", M, format = rectangular); > fclose("D:/Data/Data6/My_Filea.txt"); > restart; > M := ImportMatrix("D:/Data/Data6/My_Filea.txt", format = rectangular); [2 3] [ ] M := [3 4] [ ] [2 0]Hope it help.
THANK YOU
THank you very much, I could do it!