Answer to Question #23806 in MatLAB | Mathematica | MathCAD | Maple for Jonni

Question #23806
Hello

I have this function

function P=square(a,b,c,d)
clf
axis([a b c d])
hold on
hnappur=1;
while hnappur==1
[x,y,hnappur]=ginput(1);
if hnappur==1
plot(x,y,'o')
end
end

It puts up a picture and I can click on it to plot single points. I want to add to this function that it can read four points that I click, and draw a rectangle between them. How do I make matlab read the point that I click?

Thank you so mutch for your help
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS