figure;set(0,'ShowHiddenHandles','on')set(gcf,'Renderer','OpenGL');set(gcf,'Color','k');set(gca,'Color','k');set(gcf,'Colormap',colma); light; lighting gouraud;shading flat ;daspect([1 1 1]); grid off; axis tight;%box on
[xx yy zz] =sphere(25);X=xx;Y=yy;Z=zz;hold on; bad handleError in surf (line 86) cax = newplot(cax);Error in prolawat (line 593) surf(X,Y,Z,'Tag',aa,'UserData',j)for j=1:numat % bb=num2str(j);
aa=atnam(j) ;ii=strfind(atom,aa) ; r=atradi(ii); px=x(j); py=y(j) ;pz=z(j); X=xx*r+px; Y=yy*r+py; Z=zz*r+pz; surf(X,Y,Z,'Tag',aa,'UserData',j) hold onend hc=findobj('Type','Surface','Tag','C'); set(hc,'EdgeColor','none','FaceColor',colma(1,:)) hn=findobj('Type','Surface','Tag','N'); set(hn,'EdgeColor','none','FaceColor',colma(2,:)) ho=findobj('Type','Surface','Tag','O'); set(ho,'EdgeColor','none','FaceColor',colma(3,:)) hs=findobj('Type','Surface','Tag','S'); set(hs,'EdgeColor','none','FaceColor',colma(4,:)) hw=findobj('Type','Surface','Tag','W'); set(hw,'EdgeColor','none','FaceColor','b'); hsu=findobj('Type','Surface');
MATLAB: Code below for placing tagged spheres in a box worked well before but not with R2018a version (error messages included)
bad graphics handlesMATLAB
Best Answer