error with references

From: Raul Eduardo Puebla <rep54_at_email.domain.hidden>
Date: Mon, 20 May 2013 10:41:12 -0400
Hi everyone,

I got an error again. Now, I trying the next script:


variable t = default_plasma_state ();
t.norm = Double_Type[n];
t.norm[*] = 1.0;
t.temperature = 1.e6 + (1.e7 * [1:n])/n;

variable Ne_Lines = where (el_ion(Ne,10));
variable Mg_Lines = where (el_ion(Mg,12));
variable Contrib_Flag = MODEL_LINES;
define xaped_hook (id)
    {
       variable f = struct
              {
                 contrib_flag, line_list
              };
       f.contrib_flag = Contrib_Flag;

       if (id == 1) f.line_list = Ne_Lines;
       else if (id == 2) f.line_list = Mg_Lines;
       else f = NULL;

       return f;
    }

create_aped_fun ("xaped", t, &xaped_hook);
fit_fun ("xaped");
list_par;
variable e = 10.0^[-1:1:0.005];
variable n = length (e);
variable lo = e[[0:n-1]];
variable hi = e;
hi[[0:n-2]] = lo[[1:n-1]];
hi[n-1]=2.*lo[n-1] - lo[n-2];
variable xpar = [1,1,1,4333333,7666667,1.1e+07,1,0,0,1];
variable args = aped_hook_args (&xaped_hook,1);
variable s = eval_fun2("xaped",lo,hi,xpar,args);
hplot(lo,hi,s);



And I got the next error message:

"Expecting struct type object.  Found Null_Type"


And I could not get the plot.

Somebody knows what am I doing wrong?

Thanks.

Raul

----
You received this message because you are
subscribed to the isis-users list.
To unsubscribe, send a message to
isis-users-request_at_email.domain.hiddenwith the first line of the message as:
unsubscribe
Received on Mon May 20 2013 - 10:41:36 EDT

This archive was generated by hypermail 2.3.0 : Fri May 02 2014 - 08:35:47 EDT