{"id":576,"date":"2017-09-14T13:42:22","date_gmt":"2017-09-14T16:42:22","guid":{"rendered":"http:\/\/www.professores.uff.br\/diomarcesarlobao\/?page_id=576"},"modified":"2017-09-14T13:42:22","modified_gmt":"2017-09-14T16:42:22","slug":"makshape-m","status":"publish","type":"page","link":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/makshape-m\/","title":{"rendered":"makshape.m"},"content":{"rendered":"<pre>function D = makshape\r\n% Allows user to create a 2D shape using picks in the graphics\r\n% window.  The shape is stored in array D where the 1st column\r\n% is vector of x-coordinates, 2nd column is vector of y-coordinates\r\n%\r\n% USAGE:  D = makshape\r\n%\r\n% to make the shape:\r\n%     LEFT MOUSE BUTTON   - pick a point\r\n%     RIGHT MOUSE BUTTON  - end shape creation\r\n\r\nclf\r\nfx = [-10 10 10 -10 -10];\r\nfy = [-10 -10 10 10 -10];\r\nplot(fx,fy)                   % draws a 10 X 10 frame\r\naxis('equal')\r\n\r\nhold on\r\n\r\ni = 0;\r\nb = 1;\r\n\r\nwhile b &lt; 2     % read picks until right button\r\n   [tx, ty, b] = ginput(1);  % read single pick point and button\r\n   if b == 1      % left button -&gt; store point coordinates and plot\r\n      i = i+1;\r\n      x(i) = tx; y(i) = ty;\r\n      plot(tx,ty,'b+')\r\n   end\r\nend\r\n\r\n\r\nD(:,1) = x';\r\nD(:,2) = y';\r\n\r\nx(i+1) = x(1);\r\ny(i+1) = y(1);\r\nplot(x,y)\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>function D = makshape % Allows user to create a 2D shape using picks in the graphics % window. The shape is stored in array D where the 1st column % is vector of x-coordinates, 2nd column is vector of y-coordinates % % USAGE: D = makshape % % to make the shape: % LEFT [&hellip;]<\/p>\n","protected":false},"author":22,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[],"tags":[],"class_list":["post-576","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/576","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/comments?post=576"}],"version-history":[{"count":1,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/576\/revisions"}],"predecessor-version":[{"id":577,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/pages\/576\/revisions\/577"}],"wp:attachment":[{"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/media?parent=576"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/categories?post=576"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.professores.uff.br\/diomarcesarlobao\/wp-json\/wp\/v2\/tags?post=576"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}