Need help in changing function from python to matlab

7 Ansichten (letzte 30 Tage)
Lisa Masipa
Lisa Masipa am 23 Okt. 2020
Beantwortet: Cris LaPierre am 23 Okt. 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

Antworten (1)

Cris LaPierre
Cris LaPierre am 23 Okt. 2020

Kategorien

Mehr zu Call Python from MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by