⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 homelogo.m

📁 关于电机的.m程序
💻 M
字号:
%    MOVIE OF INDUCTION MACHINE 
clc,clear,close all
disp(date)
info= ...  
        ['           SQUIRREL-CAGE INDUCTION MACHINE          '
         ' A movie can also be run under Windows Media Player '
         ' by activating the "imfield.avi" file just created. '];  
         
disp(info)
warning off
aviwave=avifile('homelogo1.avi','compression','cinepak');
phis=0;rr=0.4;e=0;e1=0;d=0;d1=0;r=0.7;n=11;z=0;
%
 figure('units','normalized','Position',[.36 .09 .63 .72],'Name','INDUCTION MOTOR',...
        'NumberTitle','off');
 set(gcf,'color','w')      
    
  % for e=0:1.5:358.5 
  for e=0:1:19
      z=z+1;         
      Fa1=.70*cos(phis);Fb1=.70*sin(phis);      
      Fa4=.70*cos(phis+pi);Fb4=.70*sin(phis+pi);
      q=0:pi/40:2*pi;q1=pi:pi/20:2*pi;q2=pi:-pi/20:0;
      fill([0 -1 1],[-0.4 -1.2 -1.2],[.6 .6 .4],'LineWidth',1.5),hold on
      fill(.9*cos(q),0.9*sin(q),[.6 .6 .6],'LineWidth',1.5)
      h1= patch(.62*cos(q1),0.62*sin(q1),1:length(q1),'facecolor','interp');
      h2=patch(.62*cos(q2),0.62*sin(q2),1:length(q2),'facecolor','interp');
      fill(.48*cos(q),0.48*sin(q),[.6 .6 .6],'LineWidth',1.5)
      rotate(h1,[0 0 1],0,[0 0 0])
      rotate(h2,[0 0 1],0,[0 0 0])
     % f1=plot(0,0,'xk',[0 1 .95 1 .95],[0 0 .03 0 -.03],'-k','LineWidth',2);
      %rotate(f1,[0 0 1],e,[0 0 0])
 for k=2:1:2*n-1
    theta=acos((n-k)/(n-1));
    x=r*cos(theta); y=r*sin(theta);
    h1=plot(x,y,'o','MarkerSize',10,'MarkerFacecolor','b');
    rotate(h1,[0 0 1],0,[0 0 0])
end
for j=2:1:2*n-1
    theta=acos((n-j)/(n-1));
    x=r*cos(theta); y=-r*sin(theta);
    h2=plot(x,y,'o','MarkerSize',10,'MarkerFacecolor','g');
    rotate(h2,[0 0 1],0,[0 0 0])
end
h3=plot(r,0,'o','MarkerSize',10,'MarkerFacecolor','w');
rotate(h3,[0 0 1],0,[0 0 0])
h4=plot(-r,0,'o','MarkerSize',10,'MarkerFacecolor','w');
rotate(h4,[0 0 1],0,[0 0 0])


      for w=1:18
         h3=plot(0.4,0,'ko','MarkerSize',12,'MarkerFacecolor','y');
         rotate(h3,[0 0 1],d+(1.0*e),[0 0 0])
         d=d+20;
        end
      
      text(-1.04,1.13,'SQUIRREL-CAGE INDUCTION  MOTOR','FontSize',18,'FontWeight','bold','color','blue')
      text(-.35,-1.05,'Click the motor','FontSize',16,'FontWeight','bold','color','r')
      set(gca,'Xlim',[-1.2 1.2],'Ylim',[-1.2 1.2],'visible','off')
      axis square
     hold off
      %  
       M(z)=getframe;
      f=getframe(gca);
      aviwave=addframe(aviwave,f);
  end
     aviwave=close(aviwave);
     uicontrol('Units','normalized', ...
   'Style','PushButton',...
	'BackgroundColor',[.2 .3 .8], ...
	'Callback','movie(M,1)', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 1 1], ...
	'Position',[0.35 0.05 0.09 .05], ...
	'String','Repeat', ...
    'TooltipString','Repeat');
    uicontrol('Units','normalized', ...
   'Style','PushButton',...
	'BackgroundColor',[.2 .3 .8], ...
	'Callback','close,clear,close all', ...
	'FontSize',10, ...
	'FontWeight','bold', ...
	'ForegroundColor',[1 1 1], ...
	'Position',[0.60 0.05 0.09 .05], ...
	'String','Quit', ...
    'TooltipString','Quit');
  %%%%%%%    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -