フィルターのクリア

Generating Square wave in UIAxes

2 ビュー (過去 30 日間)
Tejas Mahajan
Tejas Mahajan 2020 年 10 月 15 日
回答済み: Ameer Hamza 2020 年 10 月 15 日
I want to plot a Square Wave in the UIAxes of the Matlab App Designer. Please help me with this.

回答 (1 件)

Ameer Hamza
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)

カテゴリ

Help Center および File ExchangeDevelop Apps Using App Designer についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by