[問題] ginput的問題已回收
malab的指令中
從索引中找到ginput的相關用法 語法如下
clc
clear all
axis([0 10 0 10])
hold on
% Initially, the list of points is empty.
xy = [];
n = 0;
% Loop, picking up the points.
disp('Left mouse button picks points.')
disp('Right mouse button picks last point.')
but = 1;
while but == 1
[xi,yi,but] = ginput(1);
plot(xi,yi,'ro')
n = n+1;
xy(:,n) = [xi;yi];
end
% Interpolate with a spline curve and finer spacing.
t = 1:n;
ts = 1: 0.1: n;
xys = spline(t,xy,ts);
% Plot the interpolated curve.
plot(xys(1,:),xys(2,:),'b-');
hold off
請問各位大大 該怎樣才能不讓右鍵的值當做最後一個值
也就是說 我按右鍵直接執行
然後輸入的最後一個data是左鍵輸入 不是右鍵輸入
謝謝各位大大的指導
--
心機鬼屋 歡迎大家一起來耍心機
http://www.wretch.cc/blog/pazane1115
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.117.60.224
推
11/17 18:31, , 1F
11/17 18:31, 1F
→
11/17 19:17, , 2F
11/17 19:17, 2F
→
11/17 20:18, , 3F
11/17 20:18, 3F
→
11/17 20:27, , 4F
11/17 20:27, 4F
→
11/17 20:30, , 5F
11/17 20:30, 5F
→
11/17 20:39, , 6F
11/17 20:39, 6F
→
11/17 20:40, , 7F
11/17 20:40, 7F
→
11/17 20:41, , 8F
11/17 20:41, 8F