Need help in changing function from python to matlab

조회 수: 7 (최근 30일)
Lisa Masipa
Lisa Masipa 2020년 10월 23일
답변: Cris LaPierre 2020년 10월 23일
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

답변 (1개)

Cris LaPierre
Cris LaPierre 2020년 10월 23일

카테고리

Help CenterFile Exchange에서 Call Python from MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by