From 2b412cf470b88b3fcc82a43da974fd43ad415ea4 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Tue, 29 Nov 2022 16:21:27 +0100 Subject: [PATCH] derivative inside of .func --- examples/ddt/ddt-test2.cir | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 examples/ddt/ddt-test2.cir diff --git a/examples/ddt/ddt-test2.cir b/examples/ddt/ddt-test2.cir new file mode 100644 index 000000000..a101f62b3 --- /dev/null +++ b/examples/ddt/ddt-test2.cir @@ -0,0 +1,18 @@ +dd test 2 with .func + +V1 1 0 dc 0 pulse 0 2 0 1 1 1 4 + +B2 2 0 v = ddt(V(1)) + +B3 3 0 v = border(v(1)) + +.func border(x) if (ddt(x) > 0, 1, 0) + +.tran 1m 8 + +.control +run +plot v(1) v(2) v(3) +.endc + +.end