調(diào)用其他網(wǎng)站文章列表網(wǎng)絡(luò)營銷自學(xué)網(wǎng)站
在matlab APPdesigner中繪圖可以用UIAxes組件進(jìn)行繪圖,但是當(dāng)想多張圖時,只能提前繪制圖像區(qū)域不方便。下面是幾種辦法:
為了操作可以添加Panl組件,方便操作。
1、當(dāng)是要求的幾個圖像大小都是相同時刻采用函數(shù):
tiledlayout
創(chuàng)建分塊圖布局
tiledlayout(m,n)
tiledlayout('flow')
tiledlayout(___,Name,Value)
tiledlayout(parent,___)
t = tiledlayout(___)
這里的Parent可以是:
parent
— 父容器
Figure
對象 | Panel
對象 | Tab
對象 | TiledChartLayout
對象
2、當(dāng)要求使用各個圖像不一致時:
uiaxes函數(shù)
為 App 中的繪圖創(chuàng)建 UI 坐標(biāo)區(qū)
ax = uiaxes
ax = uiaxes(Name,Value)
ax = uiaxes(parent)
ax = uiaxes(parent,Name,Value)
parent
— 父容器
Figure
對象 | Panel
對象 | Tab
對象 | GridLayout
對象 | TiledChartLayout
對象
首先加入一個uiaxes對象,最大的position大小,然后根據(jù)這個大小進(jìn)行繪制plot。
%%下面是邏輯值轉(zhuǎn)成十進(jìn)制數(shù)的語法;
TimeButtonValue = app.TimeButton.Value;
SpectrumButtonvalue = app.SpectrumButton.Value;
SpectrogramButtonValue = app.SpectrogramButton.Value;
PannerButtonValue = app.PannerButton.Value;
logicalArray = [TimeButtonValue,SpectrumButtonvalue,SpectrogramButtonValue,PannerButtonValue];
flagnum = bin2dec(arrayfun(@(x) num2str(x), logicalArray));
要下班了。下次說。。。。