28 double tstart, tstop, tstep,
d;
29 struct plot *
new, *old;
30 struct dvec *newtime, *v;
37 fprintf(
cp_err,
"Error: no current plot or no scale\n");
41 fprintf(
cp_err,
"Error: non-real time scale for %s\n",
46 fprintf(
cp_err,
"Error: plot must be a transient analysis\n");
54 if (((tstop - tstart) * tstep <= 0.0) || ((tstop - tstart) < tstep)) {
56 "Error: bad parameters -- start = %G, stop = %G, step = %G\n",
57 tstart, tstop, tstep);
64 (void) sprintf(buf,
"%s (linearized)", old->
pl_name);
65 new->pl_name =
copy(buf);
75 len = (tstop - tstart) / tstep + 1.5;
83 for (i = 0, d = tstart; i < len; i++, d += tstep)
87 if (wl && !
cieq(wl->wl_word,
"all")) {
91 fprintf(
cp_err,
"Error: no such vector %s\n",
101 for (tl = wl0; tl; tl = tl->
wl_next) {
116 struct
dvec *ov, *oldscale;
124 fprintf(
cp_err,
"Warning: %s is not real\n", ov->v_name);
127 if (ov->v_length < oldscale->v_length) {
128 fprintf(
cp_err,
"Warning: %s is too short\n", ov->v_name);
137 nd = (
double *)
tmalloc(newlen *
sizeof (
double));
139 oldscale->v_length, newscale, newlen, 1)) {
140 fprintf(
cp_err,
"Error: can't interpolate %s\n", ov->v_name);
static char buf[MAXPROMPT]
struct plot * plot_alloc()
void com_linearize(wordlist *wl)
struct dvec * vec_fromplot()
struct wordlist * wl_next