Clear Filters
Clear Filters

Errors when using "close" or "close all"

21 views (last 30 days)
Christopher Ison
Christopher Ison on 10 Sep 2015
Commented: Walter Roberson on 7 May 2018
I have 2015a. Never had problems with "close" or "close all" in the last two decades. What gives? I had 20 figures open from a plotting function. I turned off tiling, just let them plot naturally one on top of another. Still no joy. Completely baffled at this "new" behavior. Output is listed below.
>> close all
Error using unique
Too many input arguments.
Error in ismemberCismemberClassTypes (line 376)
[uA,~,icA] = unique(a(:),'sorted');
Error in ismemberRismemberR2012a (line 165)
lia = ismemberClassTypes(a,b);
Error in ismember (line 57)
lia = ismemberR2012a(A,B);
Error in setdiffRsetdiffR2012a (line 193)
logUA = ~(ismember(a,b));
Error in setdiff (line 83)
[varargout{1:nlhs}] = setdiffR2012a(varargin{:});
Error in close>safegetchildren (line 338)
Error in close (line 132)

Answers (2)

Steven Lord
Steven Lord on 10 Sep 2015
What does this command show? If it shows unique.m functions other than those included in MathWorks products, remove the directories containing them from the MATLAB path, rename them, or remove them.
which -all unique
  1 Comment
Christopher Ison
Christopher Ison on 10 Sep 2015
Thanks, it worked. I am, however, puzzled as to why this never happened before. "unique" is a bad choice for a function name for several syntactical reasons but there are plenty of such examples.

Sign in to comment.


Shuangjun
Shuangjun on 6 May 2018
Edited: Walter Roberson on 6 May 2018
I also get an error when call close all. I ran unique check and everything files are from matlab toolbox folder.
>> which -all unique
E:\Program Files\MATLAB\R2017a\toolbox\matlab\ops\unique.p
E:\Program Files\MATLAB\R2017a\toolbox\matlab\ops\@cell\unique.p % cell method
E:\Program Files\MATLAB\R2017a\toolbox\matlab\ops\@cell\unique.m % cell method
E:\Program Files\MATLAB\R2017a\toolbox\matlab\datatypes\@tabular\unique.m % tabular method
E:\Program Files\MATLAB\R2017a\toolbox\matlab\datatypes\@categorical\unique.m % categorical method
E:\Program Files\MATLAB\R2017a\toolbox\matlab\timefun\@duration\unique.m % duration method
E:\Program Files\MATLAB\R2017a\toolbox\matlab\timefun\@datetime\unique.m % datetime method
E:\Program Files\MATLAB\R2017a\toolbox\matlab\bigdata\@tall\unique.m % tall method
E:\Program Files\MATLAB\R2017a\toolbox\rtw\rtw\@RTW\unique.p % RTW method
E:\Program Files\MATLAB\R2017a\toolbox\distcomp\parallel\@distributed\unique.m % distributed method
E:\Program Files\MATLAB\R2017a\toolbox\distcomp\gpu\@gpuArray\unique.m % gpuArray method
E:\Program Files\MATLAB\R2017a\toolbox\mbc\mbc\@xregpointer\unique.m % xregpointer method
E:\Program Files\MATLAB\R2017a\toolbox\mbc\mbc\@guidarray\unique.m % guidarray method
E:\Program Files\MATLAB\R2017a\toolbox\shared\statslib\@dataset\unique.m % dataset method
E:\Program Files\MATLAB\R2017a\toolbox\symbolic\symbolic\@sym\unique.m % sym method
E:\Program Files\MATLAB\R2017a\toolbox\matlab\ops\unique.m
Can you help in this?

Categories

Find more on Structures in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!