How to use the same input from a different function?

Say that i have two different function both in two different pushbutton, A and B. In A, I will get 2 images as input. Later in B, i want to use the same 2 images I chose in A. Can i use set&get ? If yes, how to do the statement?
Thank you.

3 件のコメント

Pratik Patil
Pratik Patil 2019 年 12 月 23 日
There are two ways to achieve this.
  1. You can create a global veriable and assign image data or image file path to that variable. Follow this page.
  2. You can write a singleton class and write get and set methods to access image data values of image file path. Follow this page.
Image Analyst
Image Analyst 2019 年 12 月 23 日
See the FAQ.
coolcoolcoolcoolcool
coolcoolcoolcoolcool 2019 年 12 月 24 日
I tried the global variable and it works ! I put global variable to every fxn that requires to call back the input :) Thank you Mr Pratik and Image Analyst !

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImage Processing Toolbox についてさらに検索

質問済み:

2019 年 12 月 22 日

コメント済み:

2019 年 12 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by