照明论坛-LED论坛-照明家族
标题: 08-LTspice 参数变量设置.param [打印本页]
作者: 888888 时间: 2021-6-30 08:36
标题: 08-LTspice 参数变量设置.param
LTspice 参数变量
The .param
The .param statement can be included inside a subcircuit definition to limit the scope the parameter value to that subcircuit.
param语句可以包含在子电路定义中,以将参数值的范围限制在该子电路中
To invoke parameter substitution and expression evaluation, enclose the expression in curly braces. The enclosed expression will be replaced with the floating-point value.
要调用参数替换和表达式求值,请将表达式括在花括号中。封闭的表达式将被浮点值替换
Below is an example using both a .param statement and directly passing parameters on the subcircuit invocation line.
下面是一个使用.param语句和直接向子电路调用行传递参数的示例。
*
* This is the circuit definition 电路定义
.params x=y y=z z=1k*tan(pi/4+.1)
X1 a b 0 divider top=x bot=z
V1 a 0 pulse(0 1 0 .5μ .5μ 0 1μ)
* this is the definition of the subcircuit 电路分支的定义
.subckt divider n1 n2 n3
r1 n1 n2 {top}
r2 n2 n3 {bot}
.ends
*
.tran 3μ
.end
欢迎光临 照明论坛-LED论坛-照明家族 (http://lightingfamily.net/) |
Powered by Discuz! X3.4 |