- 1、本文档共82页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
012 matlab getting started guide-programming2.ppt
MATLAB? 及其在通信中的应用 4 Programming ? 4.1 “Flow Control” “Conditional Control — if, else, switch” switch and case “Loop Control — for, while, continue, break” “Error Control — try, catch” “Program Termination — return” ? 4.2 “Other Data Structures” “Multidimensional Arrays” “Cell Arrays” “Characters and Text” “Structures” ?4.3 “Scripts and Functions” “Overview” “Scripts” “Functions” “Types of Functions” Primary and Subfunctions Private Functions Nested Functions Function Overloading “Global Variables” “Passing String Arguments to Functions” “The eval Function” “Function Handles” “Function Functions” “Vectorization” “Preallocation” ?4.4 “Object-Oriented Programming” Because private functions are invisible outside the parent directory, they can use the same names as functions in other directories. This is useful if you want to create your own version of a particular function while retaining the original in another directory. Because MATLAB looks for private functions before standard M-file functions, it will find a private function named test.m before a nonprivate M-file named test.m. 因为私有函数在父目录以外不可见,他们可以使用与其他目录里的函数相同的名称。这在创建自己版本的特别函数而保留原函数在其他目录里时很有用。因为MATLAB先寻找私有函数再寻找标准M文件函数。 You can define functions within the body of any M-file function. These are said to be nested within the outer function. A nested function contains any or all of the components of any other M-file function. In this example, function B is nested in function A: function x = A(p1, p2) ... B(p2) function y = B(p3) ... end ... end 在M文件函数体内部可以定义函数。这被称为嵌套。嵌套函数包含任何或所有其他M文件函数的部件。此例中,函数B嵌套在函数A里: So, for example, a variable that has a value assigned to it by the primary function can be read or overwritten by a function nested at any level within the primary. Like other functions, a nested function has its own workspace where variables used by the function are stored. 象其他函数,嵌套函数有自己的workspace,用于存储变量。 But it also has access to the workspaces of all functions in which it is
您可能关注的文档
最近下载
- 【精品文档】全国克雅氏病(CJD)监测方案.doc
- 北京市朝阳区卫生健康委员会所属事业单位招聘考试真题2024.docx VIP
- 17J008 挡土墙(重力式、衡重式、悬臂式)(最新).pdf VIP
- 文明施工、环境保护管理体系与措施.pdf VIP
- 影响业务连续性风险识别及评价记录表.pdf VIP
- DLT 5744.2-2016 额定电压66kV~220kV交联聚乙烯绝缘电力电缆敷设规程 第2部分:排管敷设.docx VIP
- 晕厥院前急救.pptx
- 业务连续性风险评估表.pdf VIP
- 消防中级考试试卷及答案.doc
- 废盐综合利用联产20万吨年离子膜烧碱项目可行性研究报告写作模板-申批立项.doc
文档评论(0)