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

查看:147
本文介绍了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 will be removed in a future release. Use Anonymous Functions instead.

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

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