How can i imlpement a 2D function on. Matlab

1 view (last 30 days)
I want to implement the following function on matlab, how can i do it, can you help me?. Thanks in advance
  1 Comment
Stephen23
Stephen23 on 7 Jul 2021
Edited: Stephen23 on 7 Jul 2021
The logic is inconsistent. The following two conditions are both duplicated:
m = 0, n = -1
m = -1, n = -1

Sign in to comment.

Accepted Answer

KSSV
KSSV on 7 Jul 2021
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 Comments
Deniz Bozdogan
Deniz Bozdogan on 7 Jul 2021
it always returns h1 as -1 since m=1 n=1
KSSV
KSSV on 7 Jul 2021
Edited: KSSV on 7 Jul 2021
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.

Sign in to comment.

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!