Labfans是一个针对大学生、工程师和科研工作者的技术社区。 | 论坛首页 | 联系我们(Contact Us) |
![]() |
![]() |
#1 |
高级会员
注册日期: 2019-11-21
帖子: 3,006
声望力: 66 ![]() |
![]()
我有一个简单的功能
function increase(percent, number) low = number - number*percent; end 我想返回低电平,因此可以将其用作另一个函数的参数 mitoGen(asp, arg, increase(0.2, 234), glu) 有没有办法做到这一点? 回答: 因此: function low = increase(percent, number) low = number - number*percent; end 您还可以通过在等号左侧添加多个内容来返回多个项目: function [out1, out2] = foo(bar, baz) 更多&回答... |
![]() |
![]() |