lookfor
在参考页文本中搜索关键字
说明
示例
在参考页摘要行中搜索文本
在 MathWorks 文档中所有参考页的摘要行中搜索单词 inverse
。
lookfor inverse
acos - Inverse cosine in radians acosd - Inverse cosine in degrees acosh - Inverse hyperbolic cosine acot - Inverse cotangent in radians acotd - Inverse cotangent in degrees acoth - Inverse hyperbolic cotangent acsc - Inverse cosecant in radians acscd - Inverse cosecant in degrees acsch - Inverse hyperbolic cosecant ...
在所有参考页文本中搜索文本
在摘要行中搜索单词 inverse
,并在 MathWorks 文档的所有参考页中搜索语法、描述、输入参数、输出参数和“另请参阅”章节。
lookfor inverse -all
acos: acos - Inverse cosine in radians This MATLAB function returns the Inverse Cosine (cos-1) of the elements Inverse Cosine of Value Inverse Cosine of Vector of Complex Values Plot Inverse Cosine Function acosd: acosd - Inverse cosine in degrees This MATLAB function returns the inverse cosine (cos-1) of the elements Inverse Cosine of 0 acosh: acosh - Inverse hyperbolic cosine This MATLAB function returns the inverse hyperbolic cosine of the Inverse Hyperbolic Cosine of Vector Plot the Inverse Hyperbolic Cosine Function ...
输入参数
keyword
— 要搜索的关键字
字符向量 | 字符串标量
要搜索的关键字,指定为字符向量或字符串标量。
替代功能
您可以使用当前文件夹浏览器中的查找功能,作为 lookfor
命令的替代方法。例如,您可以在当前文件夹及其子文件夹的所有 MATLAB 程序文件中查找所有出现的指定关键字。有关详细信息,请参阅查找文件。
要搜索文档(包括第三方和自定义文档),可以使用 docsearch
函数。
版本历史记录
在 R2006a 之前推出R2023a: 搜索第三方和用户编写的 MATLAB 程序文件中的帮助文本
lookfor
可搜索第三方和用户编写的 MATLAB 程序文件中的帮助文本。在 R2022b 中,lookfor
不会搜索第三方和用户编写的 MATLAB 程序文件中的帮助文本。
R2022b: 改进了搜索时的性能
lookfor
函数在搜索关键字时表现出了更好的性能。
例如,如果您使用 lookfor
函数在 MathWorks 文档的所有参考页的摘要行中搜索关键字 inverse
,搜索结果的显示速度比上一版本快 36 倍。
function timingTest lookfor inverse end
大致的执行时间是:
R2022a:6.8885 秒
R2022b:0.1909 秒
同样,如果您使用 lookfor
函数在 MathWorks 文档的所有参考页的摘要行以及语法、描述、输入参数、输出参数和“另请参阅”章节中搜索关键字 inverse
,搜索结果的显示速度比上一版本快了大约 5 倍。
function timingTest lookfor inverse -all end
大致的执行时间是:
R2022a:9.5596 秒
R2022b:1.7926 秒
代码是在运行 Windows 10 的Intel® Xeon® CPU W-2133 @ 3.60 GHz 测试系统上使用 timeit
函数计时的。
timeit(@timingTest)
R2022b: 不再搜索第三方和用户编写的帮助文本
lookfor
不再在第三方和用户编写的 MATLAB 程序文件中搜索帮助文本。在以前的版本中,lookfor
会搜索路径中的所有 MATLAB 程序文件,包括第三方和用户编写的程序文件。
要搜索文档(包括第三方和自定义文档),可以改用 docsearch
函数。您也可以使用当前文件夹浏览器中的查找功能。
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)