Need help in changing function from python to matlab
Show older comments
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
Answers (1)
Cris LaPierre
on 23 Oct 2020
0 votes
Categories
Find more on Call Python from MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!