Question: Export data calculated in a for loop

Hello,

it is more or less my first time using maple for my research. During my mesurements I collect data and store those in an excel sheet. The I made calculations row by row.

I figured out how to import the excel sheet and calculate row by row. Maple calculates the correct results, but how can I easily store the results again, for example row by row in an excel sheet or csv?

This is my code:

> restart;#Range of the Matrix A1:KXXXXprint(??);

# input placeholder

> #Number of Gobs tested?

GNR := 30;

for i to GNR do a0 := 'MX[i+1, 9]'; a1 := 'MX[i+1, 4]'; a := 'MX[i+1, 3]'; M := 'MX[i+1, 5]'; y := 'MX[i+1, 6]'; V0 := 'MX[i+1, 10]'; V := 'MX[i+1, 11]'; x := 'MX[i+1, 8]'; eta := 'MX[i+1, 7]'; g := 9.81;

q := 4*a*a0*(1/(a0-a*h)-1/a0);

r := q*(1+1/(1+tan(a)/mu[i]-1/cos(a)^2));

h := (a0+x-a1)/tan(a);

A := V0-M*g/(3.141*r*eta*a0); B := 3.141*r*eta*a0/M; C := M*g/(3.141*r*eta*a0);

eql := h+y = -A*exp(-B*t[i])/B+C*t[i]+A/B;

eq := (V0-M*g/(3.141*r*eta*a0))*exp(-3.141*r*eta*a0*t[i]/M)+M*g/(3.141*r*eta*a0)-V;

fsolve({eq, eql}, {mu[i], t[i]})

end do;

 

My interest is in storing and exporting mu[i] and t[i] row by row.

Thanks a lot, Dominik.

Please Wait...