No matter what I do in App Designer, the image doesn't update.

7 ビュー (過去 30 日間)
채호 박
채호 박 2022 年 12 月 9 日
コメント済み: chrisw23 2022 年 12 月 9 日
As shown in the figure, No. 101 (purple arrow) is in the opposite direction to No. 102. At this time, 101.jpg, which was newly saved after correcting the direction (rightmost picture), has an arrow pointing upward. However, whether I turn my computer off and on, create a new folder, or delete all my photos and move them back, the arrow always points in the downward direction before editing. What could be the problem?
function BtnOpen1ButtonPushed(app, event)
[app.filename1, user_canceled] = imgetfile('InitialPath', app.ROOT_PATH );
if user_canceled == true, return; end
[app.ROOT_PATH, name, ext] = fileparts(app.filename1);
app.Fn1.Value = app.filename1;
app.img1 = imread( app.filename1 );
image(app.UIAxes1, app.img1)
axis(app.UIAxes1, 'tight')
app.UIAxes1.Title.String = name;
nLen = length(name);
fmtspec = sprintf('%%0%dd', nLen);
name2 = sprintf(fmtspec, str2double(name) + 1 );
app.filename2 = fullfile( app.ROOT_PATH, strcat(name2, ext) );
app.img2 = imread( app.filename2 );
image(app.UIAxes2, app.img2)
axis(app.UIAxes2, 'tight')
app.UIAxes2.Title.String = name2;
end
The result window will display two arrows pointing upwards, respectively. (Like 101.jpg)
  1 件のコメント
chrisw23
chrisw23 2022 年 12 月 9 日
save your last setting on close event and load the last setting at startup

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by