필터 지우기
필터 지우기

Find the curvature of the curve traced out by the function r(t)=〈 t^2, 5t-1, 2t^3 -t 〉 at t=1.

조회 수: 8 (최근 30일)
syms t
f = t^2;
g = (5*t) - 1;
h = 2*t^3 - t;
r = [f, g, h]; % r(t)
dr = diff(r, t); % r'(t) = tangent to the curve
T = dr / norm(dr); % normalized r'(t) = T(t) = unit tangent to the curve
dT = diff(T, t); % T'(t)
k = norm(dT)/norm(dr); % Curvature at a given t ( k = ||T'(t)|| / ||r'(t)|| )
k = subs(k, 1); % Curvature at t = 1
can someone help me correct my code
my code is getting correct numbers but i need to incllude A,B, K and define R
  댓글 수: 3
mnera almansoorie
mnera almansoorie 2023년 2월 18일
이동: Walter Roberson 2023년 2월 18일
R is the r(t) K is the formula A derivative B derivative
It's a Mathlab assignment and I keep getting 20/100 so I don't know what's wrong
Torsten
Torsten 2023년 2월 18일
The formula I know to calculate curvature of a parametric curve differs from the one you use.
Look up the section "Space curves: General expressions" under

댓글을 달려면 로그인하십시오.

답변 (1개)

Amal Raj
Amal Raj 2023년 3월 14일
Hi,
Here is the corrected code:
syms t
f = t^2;
g = (5*t) - 1;
h = 2*t^3 - t;
r = [f, g, h]; % r(t)
dr = diff(r, t); % r'(t) = tangent to the curve
T = dr / norm(dr); % normalized r'(t) = T(t) = unit tangent to the curve
dT = diff(T, t); % T'(t)
k = norm(dT)/norm(dr); % Curvature at a given t ( k = ||T'(t)|| / ||r'(t)|| )
k = subs(k, 1); % Curvature at t = 1
N = dT / norm(dT); % normal vector N(t) = (T'(t)) / (||T'(t)||)
B = cross(T, N); % binormal vector B(t) = cross(T(t), N(t))
r1 = subs(r, t, 1); % r(1)
N1 = subs(N, t, 1); % N(1)
B1 = subs(B, t, 1); % B(1)
syms A B
R = r1 + A*N1 + B*B1 % osculating circle at t = 1
% Now we need to find A and B that satisfy the condition R(1) = r(1) and R'(1) = T(1)
eq1 = R == r1;
eq2 = diff(R, t) == T;
[A, B] = solve(eq1, eq2, A, B);
% Finally, we can evaluate R, A, and B at t = 1
R = subs(R, [A, B], [A, B]);
A = double(A)
B = double(B)
K = 1 / norm(R - r1)

카테고리

Help CenterFile Exchange에서 Discrete Math에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by