Info

This question is closed. Reopen it to edit or answer.

Looping a function that has any output from 0 to 1?

1 view (last 30 days)
Michael
Michael on 10 May 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
I need to generate a function that its output is any number from 0 to 1.

Answers (2)

Star Strider
Star Strider on 10 May 2014

Image Analyst
Image Analyst on 11 May 2014
How about this one?
function out = myFunction()
out = 0.5;
I figure 0.5 is as good a number as any between 0 and 1, isn't it. If you want it to be different each time, you should say so. In that case look at Start Strider's answer.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!