如何对matlab (.m)文件进行最佳/最简单的索引?

조회 수: 4 (최근 30일)
果博东方注册网址【80877.tv】
我需要搜索一大组matlab (.m)文件,但在Google Desktop中找不到这样做的方法。我也没有看到任何支持matlab的源代码索引器。
我有什么选择?

채택된 답변

新锦江娱乐开户中心【微959758504978】
我建议在The MathWorks File Exchange上查看来自Urs Schwarz的提交
这应该允许您在MATLAB中搜索一系列文件或文件夹。
上一个答案:
如果您只是尝试查找m文件,而不是在其中进行搜索,那么以下内容可能会有所帮助……
假设您想要搜索的所有m文件都在MATLAB path上(如果您真的想在MATLAB中运行它们,那么它们就必须在其中),那么您可以使用WHICH函数来查找它们所在的位置。
例如,如果我想查找名称为"display“的所有重载函数,我可以这样做:
>> which display -all
built-in (C:\Program Files\MATLAB\R2009a\toolbox\matlab\lang\@cell\display) % cell method
built-in (C:\Program Files\MATLAB\R2009a\toolbox\matlab\lang\@double\display) % double method
built-in (C:\Program Files\MATLAB\R2009a\toolbox\matlab\lang\@logical\display) % logical method
built-in (C:\Program Files\MATLAB\R2009a\toolbox\matlab\lang\@char\display)
...
您还可以使用函数形式来收集单元格数组中的文件路径:
filePaths = which('display','-all');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by