Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % Only the first function can be accessed from outside
- function [a,s]= myRand(low, high)
- a=low+rand(low,high)*(high-low);
- s=sumAllElements(a)
- end
- function summa = sumAllElements(M)
- v = M(:);
- summa = sum(v);
- end
Advertisement
Add Comment
Please, Sign In to add comment