minpack_lsquares



Here's the complete script:

kill(all)$

L: 30$ W:24$

s1: 0.66146087960253$
s2: 0.96813559654012$
s3: 0.74997966956141$
s4: 0.25042656950073$

a1: 1.183014673400058$
a2: 0.6847789579122$
a3: -0.016464555187806$
a4: -0.049325965088199$

R: sqrt(L^2+W^2)$
Lr: L/R$  Wr: W/R$

FWD: Y$  STR: X$  RCW: Z$
A: STR-RCW*(Lr)$
B: STR+RCW*(Lr)$
C: FWD-RCW*(Wr)$
D: FWD+RCW*(Wr)$

s1f: sqrt(B^2+C^2)$
s2f: sqrt(B^2+D^2)$
s3f: sqrt(A^2+D^2)$
s4f: sqrt(A^2+C^2)$
a1f: atan2(B,C)$
a2f: atan2(B,D)$
a3f: atan2(A,D)$
a4f: atan2(A,C)$

f1: define(s1(FWD,STR,RCW),s1f-s1);
f2: define(s2(FWD,STR,RCW),s2f-s2);
f3: define(s3(FWD,STR,RCW),s3f-s3);
f4: define(s4(FWD,STR,RCW),s4f-s4);
f5: define(a1(FWD,STR,RCW),a1f-a1);
f6: define(a2(FWD,STR,RCW),a2f-a2);
f7: define(a3(FWD,STR,RCW),a3f-a3);
f8: define(a4(FWD,STR,RCW),a4f-a4);

function_list: [f1,f2,f3,f4,f5,f6,f7,f8];

minpack_lsquares(function_list,[FWD,STR,RCW],[0.5,0.5,0.5]);



--- On Sat, 5/28/11, Ether Jones <maxima at etherjones.us> wrote:

> From: Ether Jones <maxima at etherjones.us>
> Subject: minpack_lsquares
> To: "maxima mailing list" <maxima at math.utexas.edu>
> Date: Saturday, May 28, 2011, 6:25 PM
> 
> Hello.
> 
> See attached screenshot (PNG file).
> 
> Am I doing something wrong, or is it just too complex for
> Maxima?
> 
> I know the answer should be [0.5, 0.3, 0.4]
> 
> Thank you.
> 
> 
> -----Inline Attachment Follows-----
> 
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>