Guest User

Untitled

a guest
Nov 21st, 2016
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.30 KB | None | 0 0
  1. s = input('Please enter the first summation limit: ');
  2. t = input('Please enter the second summation limit: ');
  3.  
  4. result = DoubleSum(s,t)
  5.  
  6. function summationResult = DoubleSum(s, t)
  7. summationResult= 0;
  8.  
  9. for i=1:s
  10.     for j=1:t
  11.         summationResult = summationResult + (i * j);
  12.     end
  13. end
  14. end
Advertisement
Add Comment
Please, Sign In to add comment