Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Lab 1.
- % Marta Trzaska 171632 SiSR
- clc
- clear all
- g = 1; % [S]; g = 1/R
- i = 1; % [A]
- N = 10; %ilość oporników
- %N = 1000;
- G = (-g)*diag(ones(1, N-1), -1) + (g+g)*eye(N, N) + (-g)*diag(ones(1, N-1), 1);
- G(1,1) = g;
- I = zeros(N,1);
- I(1,1) = i;
- % G * V = I --> V = G \ I
- V = G \ I;
RAW Paste Data