Plotting a symbolic function using linspace?

5 visualizaciones (últimos 30 días)
Salman Salamn
Salman Salamn el 4 de Oct. de 2019
Editada: Karan Nandankar el 5 de En. de 2021
Hi,
I am trying to plot the unit tangent,unit normal , and binormal vectors. However, I keep receiving the same error over and over again. Could you please tell me where I missed up?
Error in sym/privsubsasgn (line 1085)
L_tilde2 = builtin('subsasgn',L_tilde,struct('type','()','subs',{varargin}),R_tilde);
Error in sym/subsasgn (line 922)
C = privsubsasgn(L,R,inds{:});
Error in Calc_3_Prob_7 (line 12)
T(t)= UnitTangent(R);
clear
clc
close
syms t
R = [ 10*sin(t)+5*sin(5*t)+2.5*sin(2.3*t), 10*cos(t)+5*cos(5*t)+2.5*cos(2.3*t), 0.001*t.^4.*(1+(cos(2*pi*t)).^2)];
T(t)= UnitTangent(R);
N(t)= Normal(R);
B(t)= cross(T(t),N(t));
% showing the general acc lies in the osculating plane.( Binormal
% Direction)
UB(t)= B./VecSum(B);
% plot
M(t)=R;
t= linspace(0,10,601);
% plot(t,M(t))
plot(t,T(t))
hold on
plot(t,N(t))
plot(t,B(t))
for i=1:length(t)
plot(t,UB(i), 'k')
end
hold off
  4 comentarios
Walter Roberson
Walter Roberson el 4 de Oct. de 2019
Editada: Walter Roberson el 4 de Oct. de 2019
The error message suggests that UnitTangent is a variable at that point (and not one that is a file handle.)
Karan Nandankar
Karan Nandankar el 5 de En. de 2021
Editada: Karan Nandankar el 5 de En. de 2021
Hi,
Can you share the code of function 'UnitTangent()', so that I can reproduce the error at my end.

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by