How can i imlpement a 2D function on. Matlab

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

1 Comment

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

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

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

Asked:

on 7 Jul 2021

Edited:

on 7 Jul 2021

Community Treasure Hunt

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

Start Hunting!