CHECKVARS

버전 1.2.0.0 (4.38 KB) 작성자: Matt Fig
Checks for function masking by variables in an M-File.
다운로드 수: 446
업데이트 날짜: 2010/6/10

라이선스 보기

CHECKVARS(FILENAME) reads the M-File FILENAME and looks at all variables used inside. Then a check is made to see if any of these variables are possibly masking another function on the path. If conflicts are found, a description of each one is printed to the command window. [V,L] = CHECKVARS(FILENAME) also returns all variables V used in the file. L has the line number for each variable.

One fun thing is to do this:

D = dir([matlabroot,'\toolbox\matlab']);
p = pwd;

for jj = 3:length(D)
try
cd([matlabroot,'\toolbox\matlab\',D(jj).name]);
catch
continue
end

fprintf('\t\t\t In directory: %s\n',D(jj).name)
M = dir('*.m');
cd(p)

for ii = 1:length(M)
fprintf('%s\n',M(ii).name);
checkvars(M(ii).name);
fprintf('\n')
end
end

This was written in response to a newsgroup thread.
See the help for more information and examples.

String manipulation has never been my strong suit, so if there are simplifications which could be made I would appreciate an email showing me where. Also, if a bug is found please email me to let me know about it. Thanks.

인용 양식

Matt Fig (2024). CHECKVARS (https://www.mathworks.com/matlabcentral/fileexchange/27853-checkvars), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Author Block Masks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.2.0.0

Efficiencies added, help enhanced, func args utility expanded.

1.0.0.0