Advertisement
TrendyJack

hw1 2025 (non copiare spudoratamente)

Mar 18th, 2025 (edited)
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.36 KB | None | 0 0
  1. close all   % chiudi eventuali finestre aperte
  2. clearvars   % cancella memoria Workspace
  3. clc         % pulisci Command Window
  4.  
  5. %iniziazliz. vettori e matrici
  6. A1 = [2 0; 4 2];
  7. b1 = [3; 2];
  8. A2 = [9 6; 5 2; 1 4];
  9. b = [6; 1; 9];
  10.  
  11. y1 = div_matr(A1, b1);
  12. disp(y1);
  13.  
  14. y2 = div_matr(A2, b);
  15. disp(y2);
  16.  
  17. %Yij =Aij/bj
  18. function[Y]= div_matr(A, b)
  19.     Y = A./b;
  20. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement