Need help in changing function from python to matlab

7 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

Cris LaPierre
Cris LaPierre il 23 Ott 2020

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by