You can define an equation using the symbolic variables t1 and t2 using the sym function in MATLAB. Here's an example:
main.m34 chars4 lines
This creates a symbolic equation eqn which can be solved for t1 or t2.
To solve for one of the variables, you can use the solve function in MATLAB. Here's an example:
main.m149 chars6 lines
This will give you the solution for t1 when t2 = 1.
Alternatively, you can solve for t2 instead by swapping the symbolic variables in the equation and using the solve function again:
main.m176 chars8 lines
This will give you the solution for t2 when t1 = 1.
gistlibby LogSnag