nothing appears with this code

2 Ansichten (letzte 30 Tage)
Hyunji Yu
Hyunji Yu am 8 Mär. 2020
Beantwortet: Star Strider am 8 Mär. 2020
syms t;
x(t) = sin(3*t^2)*(12*t + (10*13^(1/2))/13);
y(t) = t*(6*13^(1/2)*t + 5);
z(t) = cos(3*t^2)*(12*t + (10*13^(1/2))/13);
%Length of the curve - Arc Length
speed(t) = sqrt(diff(x(t),t)^2 + diff(y(t),t)^2 + diff(z(t),t)^2);
speedsim(t) = prod(sqrt(factor(simplify(expand(speed(t)^2)))));
int(speed(t),t, 0, 2*pi);
I'm trying to find Arc Length in numerical value, but it doesn't work. Nothing appears when I click start button. Also, I don't know what to add to get numerical value because it seems like it would appear just a formula.

Akzeptierte Antwort

Star Strider
Star Strider am 8 Mär. 2020
Use vpaintegral instead of int:
syms t;
x(t) = sin(3*t^2)*(12*t + (10*13^(1/2))/13);
y(t) = t*(6*13^(1/2)*t + 5);
z(t) = cos(3*t^2)*(12*t + (10*13^(1/2))/13);
%Length of the curve - Arc Length
speed(t) = sqrt(diff(x(t),t)^2 + diff(y(t),t)^2 + diff(z(t),t)^2);
speedsim(t) = prod(sqrt(factor(simplify(expand(speed(t)^2)))));
AL = vpaintegral(speed,t, 0, 2*pi)
producing:
AL =
6363.37

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by