10 views (last 30 days)

Show older comments

Torsten
on 3 Aug 2016

Instead of generating 100 random numbers, use "rand" to generate 5 random numbers on [0:1] and set the points to

lambda=rand(5,1);

x=x1+lambda*(x2-x1);

y=y1+lambda*(y2-y1);

Best wishes

Torsten.

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

Start Hunting!