Syntax to select a specific scalar value from a result set i

R

Randy Yates

Guest
You can specify a vector of values (e.g., as an output expression in
the Analog Design Environment or an expression in the calculator)
by the syntax (for example)

v("/v_o" ?result "dc-dc")

But how do I select a specific value in that result set vector? For
example, I am simulating output voltage for a range of input voltages
and I would like to compute the gain by, e.g.,

G = (v_o(6) - v_o(4)) / (v_i(6) - v_i(4))

How to do?
--
% Randy Yates % "...the answer lies within your soul
%% Fuquay-Varina, NC % 'cause no one knows which side
%%% 919-577-9882 % the coin will fall."
%%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO
http://www.digitalsignallabs.com
 
Hi Randy,

Look at the 'value' function in the Waveform Calculator User Guide:
$CDSHOME/doc/calc/calc.pdf
Say you are running a DC analysis by sweeping v_i from 0 to 5V and you
want to measure the gain using two points v_i=2V and v_i=3V:
One way of doing this is to write:
G= ((value(VS("/v_o") 3) - (value(VS("/v_o") 1)) / 2. Assuming v_i as
the x-axis variable.

Regards,
Riad.
 
Riad KACED <riad.kaced@gmail.com> writes:

Hi Randy,

Look at the 'value' function in the Waveform Calculator User Guide:
$CDSHOME/doc/calc/calc.pdf
Say you are running a DC analysis by sweeping v_i from 0 to 5V and you
want to measure the gain using two points v_i=2V and v_i=3V:
One way of doing this is to write:
G= ((value(VS("/v_o") 3) - (value(VS("/v_o") 1)) / 2. Assuming v_i as
the x-axis variable.

Regards,
Riad.
That works! Thanks much, Riad.
--
% Randy Yates % "With time with what you've learned,
%% Fuquay-Varina, NC % they'll kiss the ground you walk
%%% 919-577-9882 % upon."
%%%% <yates@ieee.org> % '21st Century Man', *Time*, ELO
http://www.digitalsignallabs.com
 

Welcome to EDABoard.com

Sponsor

Back
Top