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 commentaire

Stephen23
Stephen23 le 7 Juil 2021
Modifié(e) : Stephen23 le 7 Juil 2021
The logic is inconsistent. The following two conditions are both duplicated:
m = 0, n = -1
m = -1, n = -1

Connectez-vous pour commenter.

 Réponse acceptée

KSSV
KSSV le 7 Juil 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 commentaires

it always returns h1 as -1 since m=1 n=1
KSSV
KSSV le 7 Juil 2021
Modifié(e) : KSSV le 7 Juil 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.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange

Produits

Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by