# Create a 3x3 matrix
A <- matrix(c(0,1,2,0.5,0.1,0,0,0.6,0.6), byrow=TRUE, ncol=3)
A
# Create an initial stage structure
initial <- c(1,3,2)
initial
# Calculate the matrix of transfer functions using default arguments
tfmat<-tfamatrix(A)
tfmat
# Plot the result
plot(tfmat)
# Calculate the matrix of transfer functions for inertia and
# specified initial stage structure using default arguments
tfmat2<-inertia.tfamatrix(A,vector=initial)
tfmat
# Plot the result
plot(tfmat2)
# Plot inertia as a function of lambda
plot(tfmat2, xvar="lambda", yvar="inertia")
Run the code above in your browser using DataLab