martaczaska

Metody Numeryczne lab 1 ver. 2

Mar 8th, 2021
513
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. % Lab 1.
  2. % Marta Trzaska 171632 SiSR
  3.  
  4. clc
  5. clear all
  6.  
  7. g = 1; % [S]; g = 1/R
  8. i = 1; % [A]
  9.  
  10. N = 10; %ilość oporników
  11. %N = 1000;
  12.  
  13. G = (-g)*diag(ones(1, N-1), -1) + (g+g)*eye(N, N) + (-g)*diag(ones(1, N-1), 1);
  14. G(1,1) = g;
  15.  
  16. I = zeros(N,1);
  17. I(1,1) = i;
  18.  
  19. % G * V = I  --> V = G \ I
  20. V = G \ I;
  21.  
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×