Need help in changing function from python to matlab

4 vues (au cours des 30 derniers jours)
Lisa Masipa
Lisa Masipa le 23 Oct 2020
Need help in converting this code from python to MATLAB
def square_wave(period, amp):
def ret(i):
if i % period < period / 2:
return amp
else:
return -amp
return ret

Réponses (1)

Cris LaPierre
Cris LaPierre le 23 Oct 2020

Catégories

En savoir plus sur Call Python from MATLAB dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by