matlab查看某一函数功能的几种方法

  • 前沿:本文主要介绍使用help,edit,doc,lookfor来查看某一函数功能的4种方法,其中doc+某一函数命令的方式比较常用。
  • 提示:全文以plot函数为例。
    首先,启动MATLAB,出现以下命令行窗口(Command Window),工作区(Work Place)等。
    matlab查看某一函数功能的几种方法
  1. 方法一: help
    使用help+函数命令的方式,查看某一函数的介绍。在命令行窗口输入help plot,便可得到plot函数的有关介绍。
    matlab查看某一函数功能的几种方法
  2. 方法二: edit
    使用edit+函数命令的方式,查看某一函数的介绍。在命令行窗口输入edit plot,同样得到plot函数的有关介绍,只不过这是查看的plot函数的m文件。
    matlab查看某一函数功能的几种方法
  3. 方法三: doc
    使用doc+函数命令的方式,查看某一函数的介绍。在命令行窗口输入doc plot,同样得到plot函数的有关介绍,只不过这是通过MATLAB帮助系统(帮助文档)查看的plot函数介绍。
    matlab查看某一函数功能的几种方法
  4. 方法四: lookfor
    使用lookfor+函数命令的方式,查看某一函数的介绍。在命令行窗口输入lookfor plot,此时将出现所有与plot函数有关的M文件,从中找plot,点击查看plot的介绍。
    matlab查看某一函数功能的几种方法
    综上,使用方法三(doc+函数)介绍比较全面。
    参考:https://jingyan.baidu.com/article/a378c960e7ece5b328283027.html