目录
lookfor函数的功能是在参考页文本中搜索关键字。
语法
lookfor keyword
lookfor keyword -all
说明
lookfor keyword 在 MathWorks® 文档中所有参考页的摘要行以及第三方和用户编写的 MATLAB® 程序文件的帮助文本中搜索指定的关键字。对于存在匹配项的所有参考页和帮助文本,lookfor 会显示链接,指向该页的帮助文本和 H1 行。
lookfor keyword -all 搜索摘要行以及每个参考页的语法、描述、输入参数、输出参数和“另请参阅”章节。对于存在匹配项的所有参考页,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
...
替代功能
可以使用当前文件夹浏览器中的查找功能,作为 lookfor 命令的替代方法。例如, 可以在当前文件夹及其子文件夹的所有 MATLAB 程序文件中查找所有出现的指定关键字。
要搜索文档(包括第三方和自定义文档),可以使用 docsearch 函数。