frcts = ...@(a,b,c)rats(union([a:c:b],b)) frcts(-2,3,1/2)frcts(1,2,2/3)
Standard input is empty
frcts = @(a, b, c) rats (union ([a:c:b], b)) ans = Columns 1 through 7: -2 -3/2 -1 -1/2 0 1/2 1 Columns 8 through 11: 3/2 2 5/2 3 ans = 1 5/3 2
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!