Connector errors on startup (MATLAB R2021b, macOS 12.0.1)

1 回表示 (過去 30 日間)
Todd Hufnagel
Todd Hufnagel 2021 年 12 月 15 日
コメント済み: Walter Roberson 2022 年 1 月 7 日
Upon startup of a fresh installation of R2021b on macOS 12.0.1, I receive the following error messages:
Error using any
Invalid data type. First argument must be numeric or logical.
Error in contains (line 8)
out = any(strfind(str,pattern));
Error in connector.internal.lifecycle.callLifecycle
Error in connector.internal.lifecycle.callConnectorStarted
Attempting to use MATLAB results in continual errors when even the simplest tasks (such as setting axis limits on a plot) are attempted. Any suggestions on how to resolve this would be appreciated.

回答 (1 件)

Sivani Pentapati
Sivani Pentapati 2022 年 1 月 6 日
Hi Todd,
These types of issues happen due to path issues and also when the cache is not up to date. You can resolve the error by restoring to the default MATLAB search path and rehash the toolbox cache. Please refer to the below answer for a detailed explanation of the workaround.
  2 件のコメント
Todd Hufnagel
Todd Hufnagel 2022 年 1 月 6 日
編集済み: Walter Roberson 2022 年 1 月 6 日
Thanks for your reply. Restoring the default path does resolve this and other odd problems I was having. But I am at a loss to explain why my path - which I have been using for years and years, including with R2021a and R2021b, should suddenly cause this problem.
To check, I unstalled Matlab (including the detritous in the various ~/Library subfolders) and reinstalled 2021b from scratch. Out of the box, the simple code
>> x=[1:10];y=[1:10];plot(x,y)
works fine. But as soon as I add a folder with my personal code to the path, I get this:
============
>> plot(x,y)
Not enough input arguments.
Error in isgraphics (line 3)
out = ishandle(h) && strcmpi(get(h,'type'),type);
Error in cla (line 45)
elseif isscalar(ax) && isgraphics(ax)
Error in newplot>ObserveAxesNextPlot (line 156)
cla(ax, 'reset', hsave);
Error in newplot (line 99)
ax = ObserveAxesNextPlot(ax, hsave);
Error in matlab.graphics.internal.newplotwrapper (line 11)
axReturn = newplot(varargin{:});
============
Restoring the default path eliminates the error. At first I thought perhaps there was a name collision between some built-in function and something in my path, but that doesn't appear to be the case.
I am at a loss to explain how merely changing the path can cause something as simple as "plot" to fail.
However: The folder I am using for my path resides on iCloud desktop. Is there a known issue there? FWIW, I've had it set up that way for years without problem - untill now.
Thanks again.
Walter Roberson
Walter Roberson 2022 年 1 月 7 日
isgraphics() is a MATLAB built-in in R2021b. You should not be able to see any code for it. The built-in isgraphics() does not use that code out = ishandle(h) && strcmpi(get(h,'type'),type);
isgraphics() is, if I recall correctly, provided by one of the more common third-party toolboxes... something like SPM; in the toolbox I am thinking of, it (and a couple of others) are provided in a subdirectory intended for compatiability with R2013a and earlier.

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

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by