Matlab 内联 VS 匿名函数 [英] Matlab inline VS anonymous functions

查看:27
本文介绍了Matlab 内联 VS 匿名函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有充分的理由在 MATLAB 中使用内联函数和匿名函数进行选择?在此处已经提出并回答了这个确切的问题,但答案对新手 MATLAB 没有帮助用户,因为代码片段不完整,因此在粘贴到 MATLAB 命令窗口时它们不会运行.有人可以提供可以粘贴到 MATLAB 中的代码片段的答案吗?

Is there a good reason to choose between using inline functions vs anonymous functions in MATLAB? This exact question has been asked and answered here, but the answer is not helpful for rookie MATLAB users because the code snippets are incomplete so they do not run when pasted into the MATLAB command window. Can someone please provide an answer with code snippets that can be pasted into MATLAB?

推荐答案

匿名函数替换了内联函数(如文档和您发布的链接中所述)

Anonymous functions replaced inline functions (as mentioned in both the docs and in the link you posted)

文档警告:

inline 将在未来版本中删除.使用匿名函数相反.

inline will be removed in a future release. Use Anonymous Functions instead.

这篇关于Matlab 内联 VS 匿名函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆