m3.m

来自「Gives all the matlab codes for dynamic s」· M 代码 · 共 21 行

M
21
字号
% M-file for Exercise 3 RL circuit simulation 
% input parameters and initial conditions

R = 0.4; %R = 0.4 ohm
L = 0.04; %L = 0.04 Henry
we = 314;  % excitation frequency in rad/sec	
Vac_mag = 100; % magnitude of ac voltage Vac in Volts 
iLo = 0; % initial value of inductor current
tstop = 0.5; % stop time for simulation
disp('run simulation, type ''return'' when ready to return')
keyboard
subplot(2,1,1)
plot(y(:,1),y(:,2))
title('ac excitation voltage')
ylabel('Vac in V')
subplot(2,1,2)
plot(y(:,1),y(:,3))
title('mesh current')
xlabel('time in sec.')
ylabel('i in A')

⌨️ 快捷键说明

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