Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [a,s]= myRand(low, high) % a, s - output arguments, which are replaced by 'y' and 'S'
- % low, high - input arguments
- a=low+rand(low,high)*(high-low);
- v = a(:);
- s = sum(v);
- end
- ----------------------CONSOLE------------------------
- [y S] = myRand(1,3)
Advertisement
Add Comment
Please, Sign In to add comment