Timing and mouse question

Hi guys Can you direct me with the following question? Greatly appreciated for you help.
Open and hold a figure in the unit aquare. Create random art by clicking with the mouse at different points inside the square and immediatetly a horizontal line and vertical line crossing at the point that has been clicked. Lines crossing at each point shaould have the same random width between 1 and 10(no need to be and integer) and the same random colour.
I have got the figure containing the unit square but from there on it's a bit of a haze for me unfortunately. Any ideas?

Risposte (1)

Steven Lord
Steven Lord il 23 Apr 2018

0 voti

Since this sounds like a homework assignment and you haven't shown us the code you wrote so far, I'm only going to give you a hint. Take a look at the ginput function. If you show us more of what you've written and ask specific questions about where you've having trouble we may be able to offer further hints.

1 Commento

Philip Mavis`
Philip Mavis` il 26 Apr 2018
Thanks for the hint and yes it is part of a homework assignment. I'll let you know of any future progress. :)

Questa domanda è chiusa.

Richiesto:

il 23 Apr 2018

Chiuso:

il 20 Ago 2021

Community Treasure Hunt

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

Start Hunting!

Translated by