Dear all,
I have developed a model doing a lot of user defined calculation in the differential equation block. Everything is working fine. Now we want to fit two curves simultaneously and do the same calculation for each curve. So now we have two functions.
Initially I thought I just have to write the same code twice for each function, with a "A" prefix for all parameters for FUNC1 and a "B" prefix for all parameters for FUNC2, something like
DIFF
IF Function=1 THEN
Calculation for FUNC1
ENDIF
IF Function=2 THEN
Calculation for FUNC2
ENDIF
DZ(1)...
DZ(2)...
END
However it doesn't work. I keep getting an error message saying
*** ERROR 10030 *** OPERATION ATTEMPTED USING A MISSING VALUE.
PROGRAM TERMINATED.
And it always hung up at the same variable. I know the variable has been assigned a value so it is not a missing value problem. My question is if my logical code makes sense? How does WNL process user defined code in DIFF when dealing with multiple FUNCs? Thanks a lot.
Jun