Displaying an image in app designer
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello. I'm new to app designer and I need to display a matrix saved as varaible app.Matrix in a kind of a preview window (not in a separate figure yet) with a button press. I tried using a UIAxes and a following code to create a place for the preview image:
title(app.UIAxes, []);
xlabel(app.UIAxes, []);
ylabel(app.UIAxes, []);
app.UIAxes.XAxis.TickLabels = {};
app.UIAxes.YAxis.TickLabels = {};
I now have an empty plot but I'm not sure how to use the imagesc function and connect it to the button so that it displays my matrix as a grayscale image as imagesc(Matrix) normally would in Matlab. I'd appreciate some tips in that matter.
댓글 수: 0
채택된 답변
Cris LaPierre
2021년 9월 15일
Use the following syntax:
where ax is your target axes (app.UIAxes). You connect it to your button by placing the code inside the button's callback function.
댓글 수: 3
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!