Ronthegreat

16 Reputation

2 Badges

15 years, 87 days

MaplePrimes Activity


These are answers submitted by Ronthegreat

Thanks for the help. Tried your second suggestion but couldn't get it to work, I think somehting to do with the format.

I've got my worksheet here with a much simpler Err1 procedure. I want the program to also return the a,b,c,d inputted into Err1, or the value of n, that produced this minimum value for Error.

I use maple 12.

>(A,B,C,E):= ({0.1,1,4.1}, {0,4,9,2.1}, {2,1,7},{2,1,0});
> V := combinat[cartprod]([A,B,C,E]);
>T := table( );
> for i from 1 while not V[finished] do T[i] := V[nextvalue]( ) end do;
> comb := [seq(op(T[j]),j=1..i-1)];

> N:=nops(comb);
> Err1:=proc(a,b,c,d)localx01,x02,x03; x01:=max(fsolve(x^2-(a+b+c^2+d))); x02:=max(fsolve(x^2-(x01+1))); x03:=max(fsolve(x^2-(x01+1))) ; return((x02/x01)-3)^2+ ((x03/x01)-6)^2 end proc;
>Error:=[seq(Err1(comb[4*n-3],comb[4*n-2],comb[4*n-1],comb[4*n]),n=1..N/4)];

> min[defined](Error);
 

Page 1 of 1