Filter löschen
Filter löschen

Generating Square wave in UIAxes

2 Ansichten (letzte 30 Tage)
Tejas Mahajan
Tejas Mahajan am 15 Okt. 2020
Beantwortet: Ameer Hamza am 15 Okt. 2020
I want to plot a Square Wave in the UIAxes of the Matlab App Designer. Please help me with this.

Antworten (1)

Ameer Hamza
Ameer Hamza am 15 Okt. 2020
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)

Kategorien

Mehr zu Develop Apps Using App Designer finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by