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 个评论

The logic is inconsistent. The following two conditions are both duplicated:
m = 0, n = -1
m = -1, n = -1

请先登录,再进行评论。

 采纳的回答

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
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 中查找有关 MATLAB 的更多信息

产品

版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by