comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » "Expression Must be a Scalar in this context:" error in nlinlsq function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
"Expression Must be a Scalar in this context:" error in nlinlsq function [message #81236] Tue, 28 August 2012 09:15
Erini Lambrides is currently offline  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!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: MPFITFUN Problem
Next Topic: Answers Today Compliments of President Obama

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:15:28 PDT 2025

Total time taken to generate the page: 0.00518 seconds