フィルターのクリア

Simple question about defining function

3 ビュー (過去 30 日間)
ALVARO EZEQUIEL MARTOS SUERO
ALVARO EZEQUIEL MARTOS SUERO 2020 年 5 月 9 日
回答済み: Ankriti Sachan 2020 年 5 月 12 日
I have a function like this:
function funs = test
funs.er=@er;
...
end
What that syntax means? My question is: How can I call "er" from funs?

回答 (1 件)

Ankriti Sachan
Ankriti Sachan 2020 年 5 月 12 日
So, to call a function "er" from "funs", you can simply call it like:
er()
or
y=er(), if 'er' has a return value.
The syntax "@er" returns a handle to the 'er' function, which can be used in functions like 'integral,' etc.

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!