[英]How to capture an output from a function in MATLAB?
我有一個簡單的功能
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)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.