Browse Source

Check for tran at first when linearize is called.

pre-master-46
Holger Vogt 4 years ago
parent
commit
a1dd1f5563
  1. 11
      src/frontend/linear.c

11
src/frontend/linear.c

@ -30,7 +30,11 @@ com_linearize(wordlist *wl)
struct dvec *lin; struct dvec *lin;
int len, i; int len, i;
if (!plot_cur || !plot_cur->pl_dvecs || !plot_cur->pl_scale) {
if (!plot_cur || !plot_cur->pl_typename || !ciprefix("tran", plot_cur->pl_typename)) {
fprintf(cp_err, "Error: plot must be a transient analysis\n");
return;
}
if (!plot_cur->pl_dvecs || !plot_cur->pl_scale) {
fprintf(cp_err, "Error: no vectors available\n"); fprintf(cp_err, "Error: no vectors available\n");
return; return;
} }
@ -39,10 +43,7 @@ com_linearize(wordlist *wl)
plot_cur->pl_typename); plot_cur->pl_typename);
return; return;
} }
if (!ciprefix("tran", plot_cur->pl_typename)) {
fprintf(cp_err, "Error: plot must be a transient analysis\n");
return;
}
/* check if circuit is loaded and TSTART, TSTOP, TSTEP are available /* check if circuit is loaded and TSTART, TSTOP, TSTEP are available
if no circuit is loaded, but vectors are available, obtain if no circuit is loaded, but vectors are available, obtain
start, stop, step data from scale vector */ start, stop, step data from scale vector */

Loading…
Cancel
Save