Update vector values and return to the program

Hi all! I faced to the problem and can't solve it. Please anybody help me. It's very important for me...
I wrote a program, where I input t vector by ginput(n). Then my program calculate and construct a curve by the developed method (calculation part of the program).
MY PROBLEM IS: I want change values of the t vector and return to the calculation part of my program, in other words, I want to refresh my t vector each time. How to do this????
(I drag t vector points on the curve and fix it as a refreshed value).
Thanks in advance. Waiting forward for the answers!!!!
Best regards, Mane

回答 (1 件)

Mischa Kim
Mischa Kim 2014 年 4 月 14 日
編集済み: Mischa Kim 2014 年 4 月 14 日

1 投票

Mane, not quite sure I understand. Do you want to read ginput's over and over again (with some calculations in between)? Something like
button = 1;
while sum(button) <=3 % read ginputs until a mouse right-button occurs
[x,y,button] = ginput(3);
end

3 件のコメント

Mane
Mane 2014 年 4 月 14 日
First of all, thanks very much for your response!
No, I want to read ginput only the first time, after that will be going some calculation algorithm, and then over and over again I want to drag the points and to process my calculation program each time.
In other words, I want see the changes on the constructed curve by changing points' position (t vector values)...
Mischa Kim
Mischa Kim 2014 年 4 月 14 日
What do you mean by "drag points"? Where from, where to?
Mane
Mane 2014 年 4 月 15 日
Here is the curve, that is constructed by my program.
Here the 'Points' are my t vector. First time I read this vector by ginput(n). After that work my calculation algorithm and finally the curve is constructed.
Now I want to drag these 'Points' (change the values of t vector), and see my curve changes in this case. So I want to work my calculation program every time as I change position of any of these points.
Please give me the way to solve my problem. It's so important to me...
Best regards, Mane

サインインしてコメントする。

カテゴリ

質問済み:

2014 年 4 月 14 日

編集済み:

2014 年 4 月 15 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by