# Ladder Mash Analysis Demo
# Enter component values for your network as shown below:
# You an enter mutiple components on one line as follows:
#    R1=5e3;R2=10e3
# You can define one component in term of another as follows:
#   R1=5e3;R2=2*R1
# Suppose we want to analyze an R/2R ladder network composed of
# 5K and 10K resistors.

# Comment lines such as this have an "#" as the first character of the line.
# In this Demo the ladder series resistors R1=10k and the shunt resistors
# R2=5k. The network has 9 mashes. The input voltage is 8 volts with a source
# resistance of 50 ohms.
# When using Mash analysys the voltage sources are used and the mash equations
# will be written in terms of Z's (Impedences).

Mashs=9            # Number of current mashs
VG= 8.0              # 8.0 volt source generator
RG= 50.0            # 50 ohm source resistance

R1 = 5e3             # Series resistor value
R2 = 10e3           # Shunt resistor value
RL = 5e3              # Last shunt resistor = R1

# Now since we are going to use "Mash Analysis" in this demo the following lines
# define the Impedence terms(Z's). Your network equations can use the following
# Z terms or the Resistor terms as defined above in which case we would not need
# to define the Z terms below: This Demo will use the RG,R1,and R1 terms in
# writing the mash equations.

Z1=R1 ; Z2=R2  # Not used in this Demo

Goals=1                                 # 'Goals' is a required var. in order to process Goal's
GOAL1 =("i9*RL","Volts" )     # 'GOAL1' can be used to define an additional printout
                                               # Mash 9 current times RL, the load resistor.