ginput used to work now it doesn't

4 ビュー (過去 30 日間)
Don
Don 2016 年 10 月 24 日
コメント済み: Don 2016 年 10 月 25 日
Plot works just fine
[ax,p1,p2] = plotyy(t,P3_FzInv,t,T4_T3,'plot');
grid on;
% [ax,p1,p2] = plotyy(xaxis,T4_T3,'r-',xaxis,P3_Fz,'b-','LineWidth',2);
% [ax,p1,p2] = plotyy(t,z1,'r-',t,z2,'b-','Linewidth',2);
%set(h,'FontSize',7,'Location','best')
xlabel(ax(1),'seconds');
ylabel(ax(1),'P3 <<--- Power Site --->> Fz');
ylabel(ax(2),'T3 <<--- Power Site --->> T4');
title(File2VarTitle);
set(p1,'LineWidth',2);
set(p2,'LineWidth',2);
FigHandle1 = figure(1);
set(FigHandle1, 'Position', [100, 100, 1700, 300]);
Ginput seems to have a problem
display (' Go to Figure (1) ');
display (' LEFT BUTTON + SHIFT to select a region, then ENTER ');
[TrajX, TrajY] = ginput;
ginput worked great for quite a while,now it doesn't work. TrajX and TrajY give a single number, not the string I used to get. What happened? Did we get a rewrite to the ginput function?
  2 件のコメント
Geoff Hayes
Geoff Hayes 2016 年 10 月 24 日
Don - according to ginput, there doesn't seem to be any changes to the output of ginput. Have you recently changed versions of MATLAB? Which version are you using? Why do you say that this function used to return a string and yet are expecting two outputs? Please clarify.
Don
Don 2016 年 10 月 25 日
was using R2015b successfully, then upgraded to R2016b and it quit working. When it worked, I got the selected string and the rest of the program executed properly

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

採用された回答

Walter Roberson
Walter Roberson 2016 年 10 月 24 日
Return has always been documented as terminating the input early, since the days of R13 at least.
It does not matter to ginput whether the user shift-clicks or not: they just need to click in two places and then press return. Or you could use
[TrajX, TrajY] = ginput(2);
Or perhaps it would make more sense to use imrect
  1 件のコメント
Don
Don 2016 年 10 月 25 日
No shift-click needed any more It works great now. They changed the Matlab in 2016 and didn't tell me, I guess

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Exploration についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by