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

📄 acdc.m

📁 Matlab实现无刷直流电机控制系统建模仿真.zip
💻 M
字号:
%This function offers solution to the formulaes of single phase ac switch and general
%dc switch
%This function runs independently as well as with "power_electronics"
%In order to execute this function type ''acdc'' on command prompt
function a=acdc(varargin)

fprintf('Welcome From Worldhitter')
i=menu('Choose Type Of The Switch','Single Phase Ac Switch','Dc Switch','To Do Once Again')
if (i == 1)
%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
        fprintf('\nProvide The Following Data :  ')
        Im=input('\nEnter The Peak Current(Amperes) :')
        fprintf('Wait For 2 Seconds :')
        h=menu('Choose What You Want To Be Calculated','Is','Ia','Ir');
if( h == 1 )
        %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        fprintf('\nWelcome From Worldhitter')
        fprintf('\n The value Of Rms Line Current is :')
        Is=Im/sqrt(2)
        %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        thanks %Function call
        thanks1(1,1) %Reapeat
        %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
elseif(h == 2)
        fprintf('\nWelcome From Worldhitter')
        fprintf('\n The value Of Average Current is :')
        Ia=Im/pi
        %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        thanks(1) %Function call   
        thanks1(1,1) %Reapeat
        %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
elseif(h == 3)        
        fprintf('\nWelcome From Worldhitter')
        fprintf('\n The value Of Rms Current is :')
        Ir=Im/2
        %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        thanks(1,1) %Function call
        thanks1(1,1)%Repeat  
     end
     
        %$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
elseif(i == 2)
        fprintf('\nProvide The Following Data :  ')
        Vs=input('\nEnter The Supply Voltage(Volts) :')
        L=input('\nEnter The Inductance(Henry) :')
        C=input('\nEnter The Value Of Capacitance(Farads)  :')
        wt=input('\nEnter The Angle(Degrees) :')
        e=menu('Choose What You Want To Be Calculated','Charging Current(it)','Capacitor Voltage(vc)');
        fprintf('\n Wait For 2 Seconds')
        pause(2)

        %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        if(e == 1) 
         fprintf('\nThe Value Of Charging Current is as under')
         a=sin(wt);
         it=Vs*sqrt(C/L)*a
         thanks1 %Function call
         thanks1(1,1)
         %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      elseif(e == 2)
         fprintf('\nThe Value Of Capacitor Voltage is as under')
         b=1-cos(wt);
         Vc=Vs*b
         thanks1(1) %Function call
         pause(1)
         thanks1(1,1)
         %^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          
      end
  
end

⌨️ 快捷键说明

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