📄 travelwavesa.m
字号:
%travelwavesA.m TRAVELING & PULSATING WAVES in AC MACHINES
clc,clear,close all
inf(1)={' WAVES AND SPACE VECTORS IN MOTION '};
inf(2)={' This demo animates the motion of traveling waves in AC machines. They represent the distribution of magnetic'};
inf(3)={' fields in the air gap.Both the sinusoidal space-time distribution and the corresponding space vectors are exhibited.'};
%
h0=figure('units','normalized','Position',[.01 .6 .7 .2],'Name','TRAVELING WAVES & SPACE VECTORS',...
'numbertitle','off','ToolBar','none');
uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',[0.76 0.76 0.76], ...
'FontWeight','bold', ...
'ForegroundColor',[0 0 0.6], ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.54 0.90 0.35], ...
'String',inf, ...
'Style','text');
uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',[0.76 0.76 0.76], ...
'FontWeight','bold', ...
'ForegroundColor',[0 0 0.6], ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.38 .42 0.12], ...
'String','Amplitude unbalance factor 0<a<1 ',...
'Style','text');
ha = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',[1 1 1], ...
'Position',[0.46 .38 .15 .12], ...
'String','1', ...
'Style','edit', ...
'TooltipString','Amplitude');
uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',[0.76 0.76 0.76], ...
'FontWeight','bold', ...
'ForegroundColor',[0 0 0.6], ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.26 .42 0.1], ...
'String','Phase unbalance factor -1<p<1 ', ...
'Style','text');
hp = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',[1 1 1], ...
'Position',[0.46 .26 .15 .12], ...
'String','1', ...
'Style','edit', ...
'TooltipString','phase');
uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',[0.76 0.76 0.76], ...
'FontWeight','bold', ...
'ForegroundColor',[0 0 0.6], ...
'HorizontalAlignment','left', ...
'Position',[0.05 0.1 .42 0.1], ...
'String','Number of cycles', ...
'Style','text');
hc = uicontrol('Parent',h0, ...
'Units','normalized', ...
'BackgroundColor',[1 1 1], ...
'Position',[0.46 .1 .15 .12], ...
'String','1', ...
'Style','edit', ...
'TooltipString','cycles');
uicontrol('Parent',h0, ...
'Units','normalized', ...
'Style','pushbutton',...
'Callback','travelwavesB', ...
'FontSize',10, ...
'BackgroundColor',[.4 .4 .4], ...
'ForegroundColor','w', ...
'FontWeight','bold', ...
'Position',[0.79 0.38 0.10 0.14], ...
'String','Run', ...
'TooltipString','run');
uicontrol('Parent',h0, ...
'Units','normalized', ...
'Style','pushbutton',...
'Callback','close all,clc', ...
'FontSize',10, ...
'FontWeight','bold', ...
'BackgroundColor',[.4 .4 .4], ...
'ForegroundColor','w', ...
'Position',[0.79 0.1 0.10 0.14], ...
'String','Quit', ...
'TooltipString','Quit');
%
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -