How to pass Data from a pushbutton to another, only when a certain pushbutton is pushed

1 回表示 (過去 30 日間)
Zakaria Souf
Zakaria Souf 2018 年 5 月 15 日
回答済み: Walter Roberson 2018 年 5 月 15 日
How to pass Data from a pushbutton to another, only when a certain pushbutton is pushed?
ps: I am using the guide app

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 5 月 15 日
It is not possible to create a "secret" variable that can be accessed only by two functions but not by any other function.
You can make forging the credentials to access the data inconvenient, such as by using a public key system to encrypt the data and using the line number and file name of the receiving pushbutton's Callback routine (obtained using dbstack) as part of the decrypting.
It would be easier if you were to change the requirement from "only when a certain pushbutton is pushed" (which means that the data cannot be available any other time to any other routine) to have the data sent when the pushbutton is pushed (which does not imply that no-one else can access it.)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by