フィルターのクリア

An error occurs when setting an axes to current axes.

1 回表示 (過去 30 日間)
Donghui  Sun
Donghui Sun 2014 年 1 月 6 日
回答済み: Jos (10584) 2014 年 1 月 6 日
In my Matlab GUI CBIR application, a figure have two axes, whose tag are axes1 and axes2, respectively. The first step, I show a image on axes1. I use the code
ax1 = findobj('Tag','axes1');
axes(ax1);
to set the axes1 to the current axes. It works well. The second step, I show several images on the axes2,I use the code
ax2 = findobj('Tag','axes2');
axes(ax2);
to set the axes2 to the current axes. It works well first time. When I repeat the second step, The error occurs, that is "Error using axes Invalid object handle,--axes(ax2);"
I am confused. Any suggestions?

回答 (1 件)

Jos (10584)
Jos (10584) 2014 年 1 月 6 日
Most likely, ax2 is empty, because that axes has been deleted … Remove the semi-colon to see if this is indeed the case:
ax2 = findobj('Tag','axes2')

カテゴリ

Help Center および File ExchangeGraphics Object Programming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by