²é¿´: 413  |  »Ø¸´: 2

2012200838

гæ (ÕýʽдÊÖ)

[ÇóÖú] ¶àÏîʽÄâºÏ£¬±¨´í˵X£¬YÊý¾Ý³¤¶È²»Ò»Ö£¬µ«ÊǶ¨Ò峤¶ÈÒ»Ñù

±¨´íÐÅÏ¢£º
CODE:
??? Error using ==> polyfit at 48
X and Y vectors must be the same size.

Error in ==> Test_fitting at 36
p_Ft=polyfit(theta_Mid,Kt,Degree);   

´úÂëÈçÏÂ
CODE:
Fx=load('Fxx.txt');
Fy=load('Fyy.txt');

n     =length(Fx);                                     % Sample quantity of Fx,Fy
theta =zeros(n,1);                                     % Rotation angle
Ft    =zeros(n,1);                                     % Tangential force initialization

for k=1:n
    theta(k)=pi/n*k;                                   % Discretize the rotation angle
end
for k=1:n
    Ft(k)=-cos(theta(k))*Fx(k)+sin(theta(k))*Fy(k);    % Evaluate Ft
end

% Calculate Kt,Kr
ft          =0.1;                                      % Feed per tooth
ap          =3;                                        % Axial cutting depth
delta_theta =10;                                       % Set the angle-cut length at both ends (Unit: degree)
delta       =round(delta_theta/180*n);                 % Quantity of samples deserted   
theta_Mid   =zeros(n-2*delta,1);                       % Angle data for fitting initialization
Kt          =zeros(n-2*delta,1);                       % Coefficient of tangential force
Ft_fit      =zeros(n-2*delta,1);                       % Fitting of Tangential force initialization


for k=delta+1:n-delta
%   Kt(k)=Ft(k)/(ft*ap);      
    Kt(k)=Ft(k)/(ap*ft*sin(theta(k)));                 % Evaluate Kt within the given interval
end

for k=1:n-2*delta
   theta_Mid(k)=theta(k+delta);                        % Cut angle data near 0 and pi
end

Degree=5;                                              % Set the polynomial degree
p_Ft=polyfit(theta_Mid,Kt,Degree);                     % Evaluate the coefficients
Kt_fit=polyval(p_Ft,theta_Mid);

for k=delta+1:n-delta
%   Ft_fit(k)=ap*ft*Kt_fit(k);      %
    Ft_fit(k)=ap*ft*sin(theta(k))*Kt_fit(k);           % Fitting expression of Ft
end

% Output
%-------------------------------------------------------------------------%
figure(1)
set(gcf,'color','w')
plot(theta,Fx,'k')                                     % Fx
hold on
plot(theta,Fy,'b')                                     % Fy
grid on
legend('Fx,Fy')
%-------------------------------------------------------------------------%
figure(2)
set(gcf,'color','w')
plot(theta,Kt,'r')                                     % Kt
hold on
plot(theta,Kt_fit,'g')                                 % Kt_fit
hold on
grid on
legend('Kt','Kt-fit')
%-------------------------------------------------------------------------%
figure(3)
set(gcf,'color','w')
plot(theta,Ft,'r')                                     % Ft
hold on
plot(theta,Ft_fit,'g')                                 % Ft_fit
hold on
grid on
legend('Ft','Ft-fit')

»Ø¸´´ËÂ¥
ÉúÃü¾ÍÊÇÒ»³¡ÂÃÐУ¬²»Òª´í¹ýÁË·±ßµÄ·ç¾°£¡
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

2012200838

гæ (ÕýʽдÊÖ)

ÕâÊÇÎÊÌâËã·¨¡£
ÏÈллÁË¡£¡£¡£

» ±¾Ìû¸½¼þ×ÊÔ´Áбí

  • »¶Ó­¼à¶½ºÍ·´À¡£ºÐ¡Ä¾³æ½öÌṩ½»Á÷ƽ̨£¬²»¶Ô¸ÃÄÚÈݸºÔð¡£
    ±¾ÄÚÈÝÓÉÓû§×ÔÖ÷·¢²¼£¬Èç¹ûÆäÄÚÈÝÉæ¼°µ½ÖªÊ¶²úȨÎÊÌ⣬ÆäÔðÈÎÔÚÓÚÓû§±¾ÈË£¬Èç¶Ô°æÈ¨ÓÐÒìÒ飬ÇëÁªÏµÓÊÏ䣺xiaomuchong@tal.com
  • ¸½¼þ 1 : ÎÊÌâËã·¨.png
  • 2014-12-02 21:52:22, 31.54 K
ÉúÃü¾ÍÊÇÒ»³¡ÂÃÐУ¬²»Òª´í¹ýÁË·±ßµÄ·ç¾°£¡
2Â¥2014-12-02 21:53:14
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû

2012200838

гæ (ÕýʽдÊÖ)

³ÌÐòÒÑÎÞÓï·¨´íÎ󣬵«µÚ¶þ·ùͼ£¬µÚÈý·ùͼ²»ÏÔʾ¡£
CODE:
Fx=load('Fxx.txt');
Fy=load('Fyy.txt');

n     =length(Fx);                                            % Sample quantity of Fx,Fy
theta =zeros(n,1);                                            % Rotation angle
Ft    =zeros(n,1);                                            % Tangential force initialization

for k=1:n
    theta(k)=pi/n*k;                                          % Discretize the rotation angle
end
for k=1:n
    Ft(k)=-cos(theta(k))*Fx(k)+sin(theta(k))*Fy(k);           % Evaluate Ft
end

% Calculate Kt,Kr
ft          =0.1;                                             % Feed per tooth
ap          =3;                                               % Axial cutting depth
delta_theta =10;                                              % Set the angle-cut length at both ends (Unit: degree)
delta       =round(delta_theta/180*n);                        % Quantity of samples deserted   
theta_Mid   =zeros(n-2*delta,1);                              % Angle data for fitting initialization
Kt          =zeros(n-2*delta,1);                              % Coefficient of tangential force
Ft_fit      =zeros(n-2*delta,1);                              % Fitting of Tangential force initialization


for k=delta+1:n-delta
%   Kt(k)=Ft(k)/(ft*ap);      
    Kt(k-delta)=Ft(k)/(ap*ft*sin(theta(k)));                  % Evaluate Kt within the given interval
end

for k=1:n-2*delta
   theta_Mid(k)=theta(k+delta);                               % Cut angle data near 0 and pi
end

Degree=5;                                                     % Set the polynomial degree
p_Ft=polyfit(theta_Mid,Kt,Degree);                            % Evaluate the coefficients
Kt_fit=polyval(p_Ft,theta_Mid);

for k=delta+1:n-delta
%   Ft_fit(k)=ap*ft*Kt_fit(k);      %
    Ft_fit(k-delta)=ap*ft*sin(theta(k))*Kt_fit(k-delta);      % Fitting expression of Ft
end

% Output
%-------------------------------------------------------------------------%
figure(1)
set(gcf,'color','w')
plot(theta,Fx,'k')                                     % Fx
hold on
plot(theta,Fy,'b')                                     % Fy
grid on
legend('Fx,Fy')
%-------------------------------------------------------------------------%
figure(2)
set(gcf,'color','w')
plot(theta,Kt,'r')                                     % Kt
hold on
plot(theta,Kt_fit,'g')                                 % Kt_fit
hold on
grid on
legend('Kt','Kt-fit')
%-------------------------------------------------------------------------%
figure(3)
set(gcf,'color','w')
plot(theta,Ft,'r')                                     % Ft
hold on
plot(theta,Ft_fit,'g')                                 % Ft_fit
hold on
grid on
legend('Ft','Ft-fit')

ÉúÃü¾ÍÊÇÒ»³¡ÂÃÐУ¬²»Òª´í¹ýÁË·±ßµÄ·ç¾°£¡
3Â¥2014-12-02 22:19:49
ÒÑÔÄ   »Ø¸´´ËÂ¥   ¹Ø×¢TA ¸øTA·¢ÏûÏ¢ ËÍTAºì»¨ TAµÄ»ØÌû
Ïà¹Ø°æ¿éÌø×ª ÎÒÒª¶©ÔÄÂ¥Ö÷ 2012200838 µÄÖ÷Ìâ¸üÐÂ
×î¾ßÈËÆøÈÈÌûÍÆ¼ö [²é¿´È«²¿] ×÷Õß »Ø/¿´ ×îºó·¢±í
[¿¼ÑÐ] 320Çóµ÷¼Á0856 +3 ²»ÏëÆðÃû×Ö112 2026-03-19 3/150 2026-03-19 22:53 by ѧԱ8dgXkO
[¿¼ÑÐ] 085600²ÄÁÏÓ뻯¹¤ Çóµ÷¼Á +14 enenenhui 2026-03-13 15/750 2026-03-19 21:53 by allen-yin
[¿¼ÑÐ] Ò»Ö¾Ô¸ÄϾ©Àí¹¤´óѧ085701×ÊÔ´Óë»·¾³302·ÖÇóµ÷¼Á +3 ¿ûè÷ÎÀ¶Ó 2026-03-18 5/250 2026-03-19 19:35 by ¸øÄãÄã×¢ÒâÐÝÏ¢
[¿¼ÑÐ] 0703»¯Ñ§µ÷¼Á +4 18889395102 2026-03-18 4/200 2026-03-19 16:13 by 30660438
[¿¼ÑÐ] Ò»Ö¾Ô¸Î÷°²½»Í¨´óѧ²ÄÁϹ¤³Ìרҵ 282·ÖÇóµ÷¼Á +5 ·ãÇÅZL 2026-03-18 7/350 2026-03-19 14:52 by ¹¦·ò·è¿ñ
[¿¼ÑÐ] 304Çóµ÷¼Á +3 ÂüÊâ2266 2026-03-18 3/150 2026-03-19 14:42 by peike
[¿¼ÑÐ] 286Çóµ÷¼Á +6 lemonzzn 2026-03-16 10/500 2026-03-19 14:31 by lemonzzn
[¿¼ÑÐ] 0703»¯Ñ§µ÷¼Á +5 pupcoco 2026-03-17 8/400 2026-03-19 13:58 by houyaoxu
[¿¼ÑÐ] Ò»Ö¾Ô¸¸£´ó288Óлú»¯Ñ§£¬Çóµ÷¼Á +3 Сľ³æ200408204 2026-03-18 3/150 2026-03-19 13:31 by houyaoxu
[¿¼ÑÐ] 281Çóµ÷¼Á£¨0805£© +9 ÑÌÏ«Ò亣 2026-03-16 19/950 2026-03-19 11:42 by laoshidan
[¿¼ÑÐ] 0703»¯Ñ§ 305Çóµ÷¼Á +4 FY_yy 2026-03-14 4/200 2026-03-19 05:54 by anny19840123
[¿¼ÑÐ] 26µ÷¼Á/²ÄÁÏ/Ó¢Ò»Êý¶þ/×Ü·Ö289/ÒѹýAÇøÏß +7 ²½´¨¿á×Ï123 2026-03-13 7/350 2026-03-18 17:12 by ¾¡Ë´Ò¢1
[¿¼ÑÐ] 070300»¯Ñ§319Çóµ÷¼Á +6 ½õÀð0909 2026-03-17 6/300 2026-03-18 13:22 by Iveryant
[¿¼ÑÐ] 334Çóµ÷¼Á +3 Ö¾´æ¸ßÔ¶ÒâÔÚ»úÐ 2026-03-16 3/150 2026-03-18 08:34 by lm4875102
[¿¼ÑÐ] 293Çóµ÷¼Á +11 zjlµÄºÅ 2026-03-16 16/800 2026-03-18 08:10 by zhukairuo
[¿¼ÑÐ] ²ÄÁÏÓ뻯¹¤×¨Ë¶µ÷¼Á +5 heming3743 2026-03-16 5/250 2026-03-17 14:03 by Ó¸ÒÌ«¼àÍõ¹«¹«
[¿¼ÑÐ] ¿¼Ñе÷¼Á +3 ä¿ya_~ 2026-03-17 5/250 2026-03-17 09:25 by Winj1e
[¿¼ÑÐ] 333Çóµ÷¼Á +3 ÎÄ˼¿Í 2026-03-16 7/350 2026-03-16 18:21 by ÎÄ˼¿Í
[¿¼ÑÐ] 326Çóµ÷¼Á +4 ŵ±´¶û»¯Ñ§½±êéê 2026-03-15 7/350 2026-03-16 17:11 by ŵ±´¶û»¯Ñ§½±êéê
[¿¼ÑÐ] 0856Çóµ÷¼Á +3 ÁõÃÎ΢ 2026-03-15 3/150 2026-03-16 10:00 by houyaoxu
ÐÅÏ¢Ìáʾ
ÇëÌî´¦ÀíÒâ¼û