Generating Square wave in UIAxes
조회 수: 5 (최근 30일)
이전 댓글 표시
I want to plot a Square Wave in the UIAxes of the Matlab App Designer. Please help me with this.
댓글 수: 0
답변 (1개)
Ameer Hamza
2020년 10월 15일
If you have signal processing toolbox, you can use square() function to generate the waveform.
t = linspace(0, 5, 500);
y = square(t*2*pi);
If you don't have the toolbox then use
t = linspace(0, 5, 500);
y = mod(t, 1) > 0.5;
and then plot it on UIAxes object
plot(app.UIAxes, t, y)
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!