Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Lab 5.
- % Marta Trzaska 171632 SiSR
- clc;
- %Dane
- E = 5; %[V]
- R = 50; %ohm
- L = 0.1; %[H]
- C = 1e-05; %[F]
- x_0 = [0;0];
- t = 20e-03; %[ms]
- h_1 = 1e-06;
- h_2 = 1e-03;
- %[u_C_h2, i_L_h2] = euler(x_0, t, h_2, C, L, E, R);
- %[u_C_h1, i_L_h1] = euler(x_0, t, h_1, C, L, E, R);
- [u_C_h2, i_L_h2] = euler(x_0, @funkcja, t, h_2, C, L, E, R);
- [u_C_h1, i_L_h1] = euler(x_0, @funkcja, t, h_1, C, L, E, R);
- figure;
- plot([1:20001], u_C_h1);
- title('Wykres zależności u_{C} od czasu (dla h_{1}=0.001)');
- xlabel('t [ms]');
- ylabel('u_{C} [V]');
- figure;
- plot([1:21], u_C_h2);
- title('Wykres zależności u_{C} od czasu (dla h_{2}=0.000001)');
- xlabel('t [ms]');
- ylabel('u_{C} [V]');
- figure;
- plot([1:length(i_L_h1)], i_L_h1);
- title('Wykres zależności i_{L} od czasu (dla h_{1}=0.001)');
- xlabel('t [ms]');
- ylabel('i_{L} [mA]');
- figure;
- plot([1:length(i_L_h2)], i_L_h2);
- title('Wykres zależności i_{L} od czasu (dla h_{2}=0.000001)');
- xlabel('t [ms]');
- ylabel('i_{L} [mA]');
- figure;
- plot([1:length(u_C_h1)], i_L_h1);
- title('Wykres zależności i_{L} od u_{C} (dla h_{1}=0.001)');
- xlabel('u_{C} [V]');
- ylabel('i_{L} [mA]');
- figure;
- plot([1:length(u_C_h2)], i_L_h2);
- title('Wykres zależności i_{L} od u_{C} (dla h_{2}=0.000001)');
- xlabel('u_{C} [V]');
- ylabel('i_{L} [mA]');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement