PySpice: Widerstand erstellen – Minimalbeispiel
English
Deutsch
Dies erstellt einen Widerstand namens R1, dessen +-Pin mit dem Knoten n1 und dessen --Pin mit GND verbunden ist. Der Wert des Widerstands ist auf 1kΩ eingestellt.
pyspice_resistor_example.py
r1 = circuit.R('R1', 'n1', circuit.gnd, 1@u_kΩ)Vollständiges Beispiel:
pyspice_resistor_full_example.py
import PySpice.Logging.Logging as Logging
logger = Logging.setup_logging()
from PySpice.Probe.Plot import plot
from PySpice.Spice.Netlist import Circuit
from PySpice.Unit import *
circuit = Circuit("MyCircuit")
r1 = circuit.R('R1', 'n1', circuit.gnd, 1@u_kΩ)Check out similar posts by category:
Electronics, Python, SPICE
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow