evaluated_B =
Hi Spencer,
From the information shared, I understand that you are trying to calculate unit tangent, unit normal, and binormal vectors. The error you are encountering seems to result from a mix-up with variable names and how the "subs" function is being used. Initially the variable "t" is a symbolic variable representing time or the parameter in the parametric equations. Later, it is redefined as the unit tangent vector, which is not only confusing but also overwrites the symbolic variable "t". This can lead to unexpected results or errors in symbolic computations. In the "subs" function, variable "vt" seems to be intended as a specific value at which "b" is to be calculated, but it's not defined.
Please follow the example MATLAB code below that addresses and resolves the above-mentioned issues:
syms t real;
% Vector valued function
r = [2*cos(t), 2*sin(t), 4*t];
% Derivative of r with respect to t
rp = diff(r, t);
% Magnitude of r prime
rn = norm(rp);
% Unit tangent vector
T = rp / rn; % Use a different variable name such as 'T' for the unit tangent vector
% Derivative of T with respect to t
Tp = diff(T, t);
% Magnitude of T prime
tn = norm(Tp);
% Unit normal vector
N = Tp / tn; % Use 'N' for the unit normal vector
% Binormal vector
B = cross(T, N);
% Solve at t = pi/2
% Specify the value at which you want to evaluate 'B'
specific_t_value = pi/2;
evaluated_B = subs(B, t, specific_t_value)
The above mentioned code involves changing the variable name for the unit tangent vector from "t" to "T" to avoid conflict with the symbolic variable "t". Similarly, it uses "N" for the unit normal vector and "B" for the binormal vector to maintain clarity. It also correctly substitutes "t" with a specific value, "pi/2", in the final step.
I hope this helps!