"Expression Must be a Scalar in this context:" error in nlinlsq function [message #81236] |
Tue, 28 August 2012 09:15 |
Erini Lambrides
Messages: 6 Registered: March 2012
|
Junior Member |
|
|
Hello folks,
So within the function I am using in nlinlsq, I have a common block that contains some global variables that are found within my main routine and used in my function (for simplicities sake it's called ddr). Since nlinlsq works on a "number of functions" basis you pretty much have to recast everything as 1D. I would like to check within my function if a value of one of my arrays is 0, yet the if statement keeps giving me an error of " Expression must be a scalar in this context: <BYTE Array(5)>." Below is a sketch of the code. Thanks in advance!
pro auto_target_offset
common offset_vals3,blah1,blah2,blah3,...,blah13,aoffxc,aoffyc
...
solution=nlinlsq("ddr",5,3)
...
end
function ddr,m,r
common offset_vals3 (same as above)
...
if aoffxc eq 0 then w=0
...
end
Thanks again!
|
|
|