ginput error in matlab 2020a

조회 수: 6 (최근 30일)
Biswaranjan Mohanty
Biswaranjan Mohanty 2021년 11월 3일
답변: Walter Roberson 2024년 2월 20일
Hello,
Code below works fine with matlab 2016. However there is an error when i am running in 2020a
Code:
scrsz = get(groot,'ScreenSize');
figure('Position',[1 1 scrsz(3)/.99 scrsz(4)/.99])
tempstart = 10000;
subplot(2,1,1)
plot(Analyze.Wrist(tempstart:tempstart+10000,:));
[x y] = ginput(2)
subplot(2,1,2)
plot(Analyze.Kluver(tempstart:tempstart+10000,:));
[x2 y2] = ginput(1)
Error:
Error using strfind
PATTERN must be a string scalar or character vector.
Error in contains (line 36)
tf = ~cellfun(@isempty, strfind(s, pattern));
Error in matlab.ui.internal.prepareFigureFor
Error in plotedit (line 124)
matlab.ui.internal.prepareFigureFor(varargin{1}, mfilename('fullpath'));
Error in uisuspend (line 48)
'ploteditEnable', plotedit(fig,'getenabletools'), ...
Error in ginput>setupFcn (line 213)
initialState.uisuspendState = uisuspend(fig);
Error in ginput (line 62)
initialState = setupFcn(fig);
Error in run_GetSingleTrialKluverMovementTimes_Bug_NewSDK (line 416)
[x y] = ginput(1)
Does it a bug in R2020a? Could someone guide me in the right direction.
  댓글 수: 1
Rishav
Rishav 2024년 2월 20일
Hi Biswaranjan,
I tested the code in MATLAB R2016b and R2020a, and for me it worked fine in both the versions.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2024년 2월 20일
Error in contains (line 36)
tf = ~cellfun(@isempty, strfind(s, pattern));
... Except that contains is a built-in function and so would not show a traceback.
This suggests that you have a third-party function contains somewhere on your MATLAB path.

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by