j4ggi

zad4a

Sep 8th, 2015
166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.18 KB | None | 0 0
  1. function v = z4a (A, b)
  2.   n = length(b);
  3.   v=0;
  4.   for i=1:n
  5.     x = 0;
  6.     for j=1:n
  7.       if(j~=i)
  8.         x += A(i,j)^2 * exp(b(j));
  9.       end
  10.     end
  11.     v+=x;
  12.   end
  13. end
Advertisement
Add Comment
Please, Sign In to add comment