I want to implement the following function on matlab, how can i do it, can you help me?. Thanks in advance

댓글 수: 1

Stephen23
Stephen23 2021년 7월 7일
편집: Stephen23 2021년 7월 7일
The logic is inconsistent. The following two conditions are both duplicated:
m = 0, n = -1
m = -1, n = -1

댓글을 달려면 로그인하십시오.

 채택된 답변

KSSV
KSSV 2021년 7월 7일

0 개 추천

m = 1 ; n = 1 ;
if m == 1 && n == -1
h1 = 1 ;
elseif m == 0 && n == -1
h1 = 1 ;
elseif
.
.
.
.
end
Add your other cases.

댓글 수: 2

it always returns h1 as -1 since m=1 n=1
KSSV
KSSV 2021년 7월 7일
편집: KSSV 2021년 7월 7일
Why? You don't want to change values of m and n?
Write it to a function with m, n as inputs and h1 as output.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Entering Commands에 대해 자세히 알아보기

제품

릴리스

R2020b

질문:

2021년 7월 7일

편집:

2021년 7월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by