Functions with 2 variables
古いコメントを表示

How do you make a function (NOT an anonymous function) from this?
"Als" means "if"
Thanks in advance
6 件のコメント
Rik
2021 年 2 月 17 日
Creating a function is fairly basic Matlab:
function output=MyFunction(input1,input2)
Is this what you mean? And why do you want to specifically avoid an anonymous function?
Jens Petit-jean
2021 年 2 月 17 日
Jens Petit-jean
2021 年 2 月 17 日
Walter Roberson
2021 年 2 月 17 日
k does not need to be an input for this function. The conditions have to do with x modulo 4: -2 <= mod(x,4) < 0 is the second condition, and 0 <= mod(x,4) < 2 is the first condition.
Walter Roberson
2021 年 2 月 19 日
採用された回答
その他の回答 (1 件)
Asayel Alazmi
2021 年 2 月 21 日
0 投票
Write an mfile using for loop to output a all numbers from 1 to 4 with an increment of 0.2
1 件のコメント
Walter Roberson
2021 年 2 月 21 日
No, I don't think doing that would help solve the question that the person posted.
カテゴリ
ヘルプ センター および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!