Need help in changing function from python to matlab

6 visualizaciones (últimos 30 días)
Lisa Masipa
Lisa Masipa el 23 de Oct. de 2020
Respondida: Cris LaPierre el 23 de Oct. de 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

Respuestas (1)

Cris LaPierre
Cris LaPierre el 23 de Oct. de 2020

Categorías

Más información sobre Call Python from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by