Need help in changing function from python to matlab

4 ビュー (過去 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 Center および File ExchangeCall Python from MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by