MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi
Opportunities for recent engineering grads.
i want to generate rondom points inside a cube.
No products are associated with this question.
You can use rand()
Z = rand(10,10,10);
The above gives you the unit cube. You can translate this and scale the side length:
Z = 2+(4-2)*rand(10,10,10);
Direct link to this comment:
Hi Wayne, I would understand
which could be plotted using
Each point would then have 3 random coordinates. How would Z = rand(10,10,10) work and how would the coordinates be assigned?
Direct link to this answer: