Matlab Math Help

903 Views Asked by At

Consider the curve traced by a point on the rim of a circle rolling along a straight line, a cycloid. If the cycloid were drawn in the xy-plane, then it could be described by the following position vector:

                       c(t)=(t-sin(t))i + (1-cos(t))j

Using MATLAB, how would i plot a cycloid for $0 \leq t \leq 6\pi$? How would i then find the velocity c'(t) of the moving point which traces the cycloid? I assume this could also be found using MATLAB but i have always been a bit rough with MATLAB expressions/inputs/etc. Lastly, is there a tool i could use to read off the graph to help find the exact length of a single arc?

Any help would be appreciated!! thanks! :)

2

There are 2 best solutions below

0
On BEST ANSWER

t = 0:0.01:6*pi;

X = t-sin(t);

Y = 1-cos(t);

plot(X,Y)

In this particular case, the velocity can be computed analytically

X_prime = 1 -cos(t)

Y_prime = sin(t)

And you can obtain length of the arc by summing $\frac{6\pi}{|T|}\sum_{t \in T}\Arrowvert c'(t) \Arrowvert_2$ (as we have a very fine grid, this sum is closed to the integral)

length = 6*pi*mean(sqrt(X_prime.^2+Y_prime.^2)

0
On
clear,close all
syms t
c=[t-sin(t) 1-cos(t)]
fplot(c(1),c(2),[0 6*pi])
dcdt=diff(c)
ar_le=int(norm(dcdt),0,2*pi)