设置figure属性----set()

    cluster_color = ['rgbmyc'];
    fig2=figure(2);
    scrsz = get(0,'ScreenSize');%获得屏幕属性
    set(fig2,'Position',[1 scrsz(4)/2-100 scrsz(3)/2 scrsz(4)/2]);%设置figure位置
    image(curFrame);%显示图片
    hold on;
    for j=1:c        %循环在图片上画点
        id = find(NcutDiscrete(:,j));
        plot(W(2*n_frames-1,id),W(2*n_frames,id),[cluster_color(j),'s'], 'MarkerFaceColor',cluster_color(j),'MarkerSize',2);
    end
    hold off;

你可能感兴趣的:(Matlab)