user interface - trisurf doesn't work in my MATLAB GUI code -
i trying write code plots convex hull of points generated convhulln. have triangle data (n 3 matrix), , cartesian coordinates of points (m 3). normally, when i'm not dealing gui, can following, , have no problems:
a=rand(20,3); t=convhulln(a); trisurf(t,a(:,1),a(:,2),a(:,3));
this works fine. when try same thing within code of gui, not work. here's have:
tt=convhulln(cluster); trisurf(handles.trisurf_area,tt,cluster(:,1),cluster(:,2),cluster(:,3));
trisurf_area
tag of plot area.
i should note following code works fine:
scatter3(handles.trisurf_area,cluster(:,1),cluster(:,2),cluster(:,3));
i use matlab 2012a.
try trisurf(tt,a(:,1),a(:,2),a(:,3),'parent',handles.trisurf_area)
.
Comments
Post a Comment