# 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
# Calculate the sensitivity matrix
tfsensmatrix(A)
# Calculate the sensitivity of simultaneous perturbation to
# A[1,2] and A[1,3]
tfsens(A, d=c(1,0,0), e=c(0,1,1))
# Calculate the sensitivity of simultaneous perturbation to
# A[1,2] and A[1,3] and return and plot the fitting process
tfsens(A, d=c(1,0,0), e=c(0,1,1),
return.fit=TRUE, plot.fit=TRUE)
Run the code above in your browser using DataLab