| T O P I C R E V I E W |
| bluecourse |
Posted - 05/28/2007 : 03:06:14 AM Hello, Mike Buess San. I know the reason about my problem which described in [Topic: NLSF: fitting with multiple independent variables. ], the real problem is about data allocation instead of about independent variables, so I'm open a new topic. The following is my data worksheet: --------------------------------------------------------------- A(Y) B(Y) C(Y) I(Y) ...... R(Y) S(Y) T(Y) --------------------------------------------------------------- The following is the definition about my formula: --------------------------------------------------------------- Parameter Names: Rd, Gd, Bd, Rs, Gs, Bs, m Indenpendent Var: Nx,Ny,Nz,Vx,Vy,Vz,Lx,Ly,Lz,Ir,Ig,Ib Dependent Var: Rm,Gm,Bm --------------------------------------------------------------- The origin C code about allocate data to NLSF is: --------------------------------------------------------------- Worksheet wks = Project.ActiveLayer(); Dataset radianceR(wks,0); Dataset radianceG(wks,1); Dataset radianceB(wks,2); Dataset normalx(wks,3); Dataset normaly(wks,4); Dataset normalz(wks,5); Dataset camerax(wks,6); Dataset cameray(wks,7); Dataset cameraz(wks,8); Dataset lightx(wks,9); Dataset lighty(wks,10); Dataset lightz(wks,11); Dataset irradianceR(wks,17); Dataset irradianceG(wks,18); Dataset irradianceB(wks,19);
NLSF.xMode =2; NLSF.y1$=radianceR.GetName(); NLSF.y2$=radianceG.GetName(); NLSF.y3$=radianceB.GetName(); NLSF.x1$=normalx.GetName(); NLSF.x2$=normaly.GetName(); NLSF.x3$=normalz.GetName(); NLSF.x4$=camerax.GetName(); NLSF.x5$=cameray.GetName(); NLSF.x6$=cameraz.GetName(); NLSF.x7$=lightx.GetName(); NLSF.x8$=lighty.GetName(); NLSF.x9$=lightz.GetName(); NLSF.x10$=irradianceR.GetName(); NLSF.x11$=irradianceG.GetName(); NLSF.x12$=irradianceB.GetName(); ---------------------------------------------------------------- There are some problem about data allocation, the data allocate result by origin C progrmm is: (I'm observed it by open select dataset dialog) ---------------------------------------------------------------- Rm Dep Data3_A Gm Dep Data3_B Bm Dep Data3_C ---->Nx Indep x of Data3_D ---->Ny Indep x of Data3_E ---->Nz Indep x of Data3_F ---->Vx Indep Data3_G ---->Vy Indep Data3_H ---->Vz Indep Data3_I ...... ...... ...... ...... ...... ...... ---------------------------------------------------------- the error data allocation are: ---->Nx Indep x of Data3_D ---->Ny Indep x of Data3_E ---->Nz Indep x of Data3_F I want the correct data allocation are: ---->Nx Indep Data3_D ---->Ny Indep Data3_E ---->Nz Indep Data3_F I think that it's perhaps the default allocation format of origin lab, it must include x of data. How can I correct this problem? Any kind help or advice is appreciated, thank you all. |
| 1 L A T E S T R E P L I E S (Newest First) |
| Mike Buess |
Posted - 05/28/2007 : 09:47:58 AM The order in which the nlsf commands are issued makes a big difference. In your case you should specify the dependent datasets last. That should change Nx Indep x of Data3_D to Nx Indep Data3_D, etc.
NLSF.x1$=normalx.GetName(); NLSF.x2$=normaly.GetName(); NLSF.x3$=normalz.GetName(); NLSF.x4$=camerax.GetName(); NLSF.x5$=cameray.GetName(); NLSF.x6$=cameraz.GetName(); NLSF.x7$=lightx.GetName(); NLSF.x8$=lighty.GetName(); NLSF.x9$=lightz.GetName(); NLSF.x10$=irradianceR.GetName(); NLSF.x11$=irradianceG.GetName(); NLSF.x12$=irradianceB.GetName(); NLSF.y1$=radianceR.GetName(); NLSF.y2$=radianceG.GetName(); NLSF.y3$=radianceB.GetName();
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 05/28/2007 10:08:16 AM |
|
|