From 8639a053a3ec0f4b4efa8263040df7d36e725c72 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Mon, 2 Mar 2026 15:56:11 +0100 Subject: [PATCH] Enable linearizing all vectors, when none is given, with or without np statement. --- src/frontend/linear.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/frontend/linear.c b/src/frontend/linear.c index 7148b8f08..7cb029253 100644 --- a/src/frontend/linear.c +++ b/src/frontend/linear.c @@ -148,6 +148,7 @@ com_linearnp(wordlist* wl) struct dvec* lin; int expo, len, i; wordlist* wlnew; + bool nponly = FALSE; if (!plot_cur || !plot_cur->pl_typename || !ciprefix("tran", plot_cur->pl_typename)) { fprintf(cp_err, "Error: plot must be a transient analysis\n"); @@ -246,7 +247,14 @@ com_linearnp(wordlist* wl) newtime->v_realdata[i] = d; new->pl_scale = new->pl_dvecs = newtime; - if (wl) { + /* check if "np=" is the only entry in wl. + If yes, linearize all vectors */ + if (wl && ciprefix("np=", wl->wl_word) && wl->wl_next == NULL) { + nponly = TRUE; + } + + if (wl && !nponly) { + /* check for vectors given in the command line */ while (wl) { if (ciprefix("np=", wl->wl_word)) { wl = wl->wl_next; @@ -264,6 +272,7 @@ com_linearnp(wordlist* wl) } } else { + /* linearize all vectors of the current plot */ for (v = old->pl_dvecs; v; v = v->v_next) { if (v == old->pl_scale) continue;