-- test.e some test utilities -- John Ringland 2005/08/27 function getVal(object v) if atom(v) then return v elsif sequence(v) and FDData(first(v)) then return fdGet(first(v)) else return nan end if end function -- iterates model and outputs the state vector -- the first data value is 'time' -- steps is how many simulation steps per test iteration global procedure test_FLModel(smModel mdl, atom iters, atom steps, atom dt) SystemMatrix M1 StateVector V sequence show M1 = mdl[1] V = mdl[2] show = {} for i = 1 to length(V) do show = show & {getVal(V[i])} end for ?{0} & show for n = 1 to iters do V = smFLinear(M1,V,steps) -- identity show = {} for i = 1 to length(V) do show = show & {getVal(V[i])} end for ?{dt * n * steps} & show end for end procedure