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!