Advertisement
Enter121

Untitled

Apr 22nd, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. A=[ 10.000 2.430 -1.250 -1.150 ;
  2. -0.240 5.100 1.670 -0.480 ;
  3. 3.900 1.240 -9.550 -1.530 ;
  4. 1.480 0.460 0.230 -4.530 ] ;
  5.  
  6. B=[ -45.170 ;
  7. -10.980 ;
  8. -2.680 ;
  9. -18.820 ] ;
  10.  
  11.  
  12. nr=rows(A);
  13.  
  14.  
  15. b=false;
  16.  
  17. for i=1;nr
  18. sum=0;
  19. for j=1;nr
  20. if i != j
  21. sum+=abs(A(i,j));
  22. endif
  23. if abs(A(i,i))<sum
  24. b=true;
  25. endif
  26. endfor
  27. endfor
  28. if b==true
  29. printf("warunek zbieznosci niespelniony\n");
  30. else
  31. printf("warunek zbieznosci spelniony\n");
  32. endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement