circulating the array to the first element after the array finishes FOR/WHILE loops
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
(in my case here, modified ellipse) and when I am starting from near the end of the array I am facing a problem with completing to the work.
Is there any MATLAB function where I can circulate the array automatically (if the program reaches the final element to complete again from the element 1).
I used an ordinary method by combining duplicating the array ..... but really this method is not good practice.
please help in this. (the function is attached where my problem is !!!!!!!!!!!!!!!!!)
% this fucntion generates the left involute of the tooth starting from a
% specific point with increment to 3000 point
% inputs
a=52;
b=37.305;
phi=20;
% the angle
ttt=0:0.0001*pi:2*pi;
% the ellipse (centrode or the pitch curve) equation
x_pitch=a*cos(ttt);
y_pitch=b*sin(ttt);
% the evolute of the ellipse (centrode evolute) equation (this equation is
% getten from the interent website of math)
x_evolute=((a^2-b^2)/a)*(cos(ttt)).^3;
y_evolute=((b^2-a^2)/b)*(sin(ttt)).^3;
% the evolute of the teeth profile(the base curve or it is called the teeth profile evolute)
%
x_base=(x_pitch-x_evolute).*cosd(phi)+x_evolute;
y_base=(y_pitch-y_evolute).*cosd(phi)+y_evolute;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% the slope of the tangent at all the points of the curve
slope=gradient(y_base,x_base);
% the left involute generator
[ x_involute ,y_involute] = left_involute_generator( x_base,y_base,1000);
0 commentaires
Réponses (0)
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!