跳到内容
MathWorks

自定进度 在线课程

  • Self-Paced Content
  • MathWorks
  • MATLAB 帮助中心
  • 社区
  • 学习
  • 获取 MATLAB MATLAB
  • 登录
    • 我的帐户
    • 我的社区资料
    • 关联许可证

    • 登出
  • 联系 MathWorks 支持人员
  • Visit mathworks.com
  • 网上课程
MathWorks MathWorks

选择网站

选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。

  • (English)
  • (Deutsch)
  • (Français)
  • (简体中文)
  • (English)

您也可以从以下列表中选择网站:

如何获得最佳网站性能

选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。

美洲

  • América Latina (Español)
  • Canada (English)
  • United States (English)

欧洲

  • 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
    • Deutsch
    • English
    • Français
  • United Kingdom (English)

亚太

  • Australia (English)
  • India (English)
  • New Zealand (English)
  • 中国
    • 简体中文
    • English
  • 日本 (日本語)
  • 한국 (한국어)

联系您当地的办事处

image for course 让您的函数对用户更友好

让您的函数对用户更友好

设计和实现具有清晰接口、适当输入验证和帮助性文档的函数,以增强可用性并改进整体用户体验。

课程模块

Introduction

Get an overview of the course.

课程:
  • Course Overview

Store Function Inputs in the Form You Want

Use the arguments block to ensure function inputs are stored in the correct size and type.

课程:
  • Allow Flexibility Without Allowing Errors
  • Specify the Size and Type of Function Inputs
  • Summary

Validate Function Inputs

Use validation functions to ensure function inputs have the correct attributes.

课程:
  • Why Validate Inputs?
  • Add Input Validation
  • The Interaction Between Size, Type, and Validation Functions
  • Summary

Create Functions with Flexible Interfaces

Write functions that allow optional inputs and can behave differently according to the calling syntax used.

课程:
  • Optional Inputs and Default Values
  • Different Behaviors for Different Calling Syntaxes
  • Lists of Multiple Named Options
  • Summary

Conclusion and Next Steps

Learn next steps and give feedback on the course.

课程:
  • Additional Resources
  • Survey

格式:自定进度

语言:中文

语言

  • 带自动反馈的实操练习
  • 通过 Web 浏览器访问 MATLAB
  • 可共享的进度报告和课程证书

编写函数的方式和原因

通过编写自定义函数增加代码的灵活性。

  • 信任中心
  • 商标
  • 隐私政策
  • 防盗版
  • 应用程序状态
  • 联系我们

© 1994-2025 The MathWorks, Inc.