(procedure (abWaveToList wave @key transpose) (let (xList yList xyList len (xVec (drGetWaveformXVec wave)) (yVec (drGetWaveformYVec wave)) ) (setq len (drVectorLength xVec)) ;----------------------------------------------------------------- ; Return value of this if is the list ;----------------------------------------------------------------- (if transpose (progn (for i 0 (sub1 len) (setq xList (tconc xList (drGetElem xVec i))) (setq yList (tconc yList (drGetElem yVec i))) ) (list (car xList) (car yList)) ) ; else (progn (for i 0 (sub1 len) (setq xyList (tconc xyList (list (drGetElem xVec i) (drGetElem yVec i)))) ) (car xyList) ) ) ; if ) ; let ) ; procedure trace = getData("node_of_interest") fprintf(trace_file "Time[ns] volts\n") foreach( point trace_as_list fprintf(trace_file "%.16f %.16f\n" (car(point) / 1e-9) nth(1 point)) ) fprintf(trace_file "\n") closeResults(cur_res_path)