Tuesday 15 June 2010

plot - plotting a rectangle and set of points together in matlab -


I'm a whole newbie for matlab .... So far, I'm experimenting with stuff. I have a set of points with a rectangle in Matlab. One of my friends told me the piece of code below ... it is going wrong

  clear all; close all; Data = cell2 mat ({1,1; 2,2; 3,3; 4,4; 5,5; 6,6;}); Xx = data (:, 1); Yy = data (:, 2); Hand = plot (xx, yy, 'r', rectangle ('position', [1,1,2,2])); Xmin = minutes (xx); Xmax = max (xx); Ymin = minutes (yy); Ymax = max (yy); Axis ([xmin xmax ymin ymax]); Axis ('square'); Set (hand, 'markers', 1);   

Conspiracy command is failing ... What do I improve ???

Place plot points on additional plots, then plot rectangle:

  Hand = plot (xx, ya, 'r'); Keep on rectangle ('position', [1,1,2,2]);    

No comments:

Post a Comment