Here is a function that returns a list of parameter ids whose corresponding names match a regular expression. An example usage is: isis> set_par (par_match (".*G1_0$"), 0.5); This sets the value of all parameters whose name ends in "G1_0" to 0.5. It would be nice if this could be integrated into set_par. Thanks, --John define par_match (pat) { variable parms = get_params (); variable i, n = length(parms); variable ok = Int_Type[n]-1; _for i (0, n-1, 1) { variable p = parms[i]; if (string_match (p.name, pat, 1)) ok[i] = p.index; } return ok[where(ok != -1)]; } ---- 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: unsubscribeReceived on Fri Aug 18 2006 - 14:21:25 EDT
This archive was generated by hypermail 2.2.0 : Thu Mar 15 2007 - 08:45:51 EDT