Plot problem though there are data numbers
Afficher commentaires plus anciens
Hello,
I made code in Matlab to produce a plot like in this picture. Although there are numbers but the graph does not work.
Thanks for the helpers and Happy New Year :)

K_t=750;
K_r=250;
b=5;
f_z=0.1;
time=0:0.008 ;
for i = 1: length(time)
t2 = mod(time(i), 0.002);
if (t2 >= 0.00134 & t2 <= 0.002)
F_x(i)=0;
F_y(i)=0;
F(i)=0;
else
st2 = sind(t2);
ct2 = cosd(t2);
h_cut = f_z * st2;
F_r=K_r*b*h_cut;
F_t=K_t*b*h_cut;
F_x(i) = -F_t .* ct2 + F_r .* st2;
F_y(i) = F_t .* st2 + F_r .* ct2;
F(i)=sqrt((F_x(i)).^2+(F_y(i)).^2);
end
end
plot(time,F_x,'--r',time,F_y,'--b',time,F,'k' )
legend('F_x' ,'F_y','F')
title('The components of the forces as a function of the angle of chip in the Up milling');
xlabel('Time [Seconds]');
ylabel('Force [N]');
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Line Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
