Question: Regarding fsolve and assign in a for loop in Maple

Hello Dear Professional users,

I have a question regarding the "fsolve" command and also the "assign" command in Maple.

In my previous codes, I just used one time from "fsolve" and then "assign" command.

Today, I want to use "fsolve" and "assign" in a for loop. But, I can not get the results correctly.

For example, previously I reach a system of algebraic equations and the solve my problem easily:

N:=8:
y:=sum(a[n]*t^n,n=0..N):
y:=unapply(y,t):
*****some calculations with a[n] coefficients *****
A:={a set of nonlinear algebraic equations in terms of a[n]}%The number of equations is N+1 (same as the number of a[n] for n=0..N)
sol:=fsolve(A):
assign(sol)
plot(y(t),t=0..1)

****************************************************************************************************
****************************************************************************************************
****************************************************************************************************

Today, my problem is:

N:=8:
M:=4:
for i from 1 to M do
y[i]:=sum(a[i,n]*t^n,n=0..N):
y[i]:=unapply(y[i],t):
end do
for i from 1 to M do
*****some calculations with a[n] coefficients *****
@A[i]:={a set of nonlinear algebraic equations in terms of a[i,n]}%The number of equations is N+1 (same as the number of a[n] for n=0..N)
@sol[i]:=fsolve(A[i]):
@assign(sol[i])
@plot(y[i](t),t=0..1)
end do
****************************************************************************************************
****************************************************************************************************
****************************************************************************************************

What I should write instead of "A[i]", "sol[i]", and "assign(sol[i])" the lines started with
@A[i],....
@sol[i],...
@assign(sol[i]),....

Thanks for your attention in advance

With kind regards,
Emran

Please Wait...