Matlab交互作图

来源:互联网 发布:linux snmp cpu 编辑:程序博客网 时间:2024/05/17 01:30
clc; clear; close all;
figure; axis([0 1 0 1]); hold on; grid on;
i = 0;
while i < 10
    i = i + 1;
    k = waitforbuttonpress;
    point_temp = get(gca, 'currentpoint');
    plot(point_temp(1, 1), point_temp(1, 2), 'p', 'MarkerSize', 15, 'MarkerEdgeColor', 'r', 'MarkerFaceColor', 'g');

end


来源:matlab论坛