please help me some of my predefined,built in functions are not working

1 回表示 (過去 30 日間)
RANJITH KUMAR
RANJITH KUMAR 2017 年 8 月 7 日
コメント済み: RANJITH KUMAR 2017 年 8 月 8 日
example:legend is not working and many functions unable save graphs shows errors like:
Error in ismember>ismemberR2012a (line 123)
if ~strcmpi(class(a),class(b))
Error in ismember (line 98)
[varargout{1:max(1,nargout)}] = ismemberR2012a(A,B,logical(flaginds(1)));
Error in cell/ismember>cellismemberR2012a (line 238)
lia = ismember(icA,indReps,'R2012a'); % Find repeats among original list
Error in cell/ismember (line 56)
[varargout{1:max(1,nargout)}] = cellismemberR2012a(A,B);
Error in filemenufcn>localExportTypes (line 390)
list( ismember(list(:,1),{'*.ai', '*.pkm'}) , :) = [];
Error in filemenufcn>localSaveExport (line 299)
typesorig = localExportTypes(hfig);
Error in filemenufcn (line 56)
localSaveExport(hfig)
Error in filemenufcn>localSave (line 183)
filemenufcn(hfig,'FileSaveAs');
Error in filemenufcn (line 54)
localSave(hfig)
Error while evaluating PushTool ClickedCallback
Error using legend (line 120)
Attempt to execute SCRIPT class as a function:
C:\Users\my laptop\Documents\MATLAB\class.m
Error in insertmenufcn (line 58)
legend(cax,'show');
Error while evaluating ToggleTool ClickedCallback
what should i do,shall i reinstall or what can i do

採用された回答

aborghes
aborghes 2017 年 8 月 7 日
Hi Ranjith,
Try typing "which class" into the command window. It should return Built-In and the path to the built-in class.m file.
From looking at your errors, it looks like you have another class.m file located at C:\Users\my laptop\Documents\MATLAB\class.m that is messing with other built-in functions
  1 件のコメント
RANJITH KUMAR
RANJITH KUMAR 2017 年 8 月 8 日
thank you so much, I had deleted that file and its working fine and is there way to check the functions that are not working properly

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

その他の回答 (1 件)

John D'Errico
John D'Errico 2017 年 8 月 7 日
Don't name your scripts things like class, or ANY other already used name. Read what it told you:
Error using legend (line 120) Attempt to execute SCRIPT class as a function: C:\Users\my laptop\Documents\MATLAB\class.m
At the command line, type this:
which class -all
Is the first line a script of your own, called class.m? DON'T USE THAT NAME.
Remember this advice for the next time you name a script or function and save it. Otherwise, expect the same type of error.
  1 件のコメント
RANJITH KUMAR
RANJITH KUMAR 2017 年 8 月 8 日
thank you so much , now figured it where the problem is coming and I have deleted the my file class.m and next time onwards I wont save like that. Is there any to find trouble shooting to list and find out the errors or function not working properly,error in predefined scripts

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

カテゴリ

Help Center および File ExchangeSpecifying Target for Graphics Output についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by