필터 지우기
필터 지우기

how to make an image disappear?

조회 수: 3 (최근 30일)
Muazma Ali
Muazma Ali 2022년 2월 8일
답변: Star Strider 2022년 2월 8일
I have inserted this short code thereafter comes another function. I want the image to disappear after some seconds so the user can see what s being displayed on the screen. Does anybody know how I can do it?
This is the short code for my image:
img = imread('Borehole_collapse.png');
image(img);
x = 0;
y = 0;
width = 0.5;% measured relative to the figure width
height = 0.5;% measured relative to the figure height
set(gca,'units','normalized','position',[x y width height])

채택된 답변

Star Strider
Star Strider 2022년 2월 8일
In the documentation on Image Properties, see the Visible property.
For the delay, see if the pause function will do what you want. Toggle the visibility to 'off' after the pause allows code execution to continue.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by