Is there a way to send a list of variables from a function (global) to a workspace (local). I need to save them as numeric data type double, and not string, but I can convert if I can get them into a string
1 回表示 (過去 30 日間)
古いコメントを表示
kbl
2 件のコメント
KSSV
2017 年 11 月 17 日
If a variable is global, it is already in workspace......for the other part..it is not clear...show us your code.
Stephen23
2017 年 11 月 17 日
"Is there a way to send a list of variables from a function (global) to a workspace (local)."
Sounds strange. Why not just pass the values using more standard, reliable, and efficient paradigms, e.g. passing arguments or nested functions?
You might like to read this:
回答 (1 件)
Walter Roberson
2017 年 11 月 17 日
- There are methods to send a value into an already-executing function if you are using the Parallel Processing Toolbox
- You could use one of the File Exchange contributions to serialize the variables into text, and use the Instrument Control Toolbox to send them into the already-executing function using tcp or udp, which would then deserialize them. The already-executing function would need to actively check for the packets. However, in order to escape from execution of the already-executing function in order to do the sending, you would need to have arranged that a callback be executed, such as a timer.
- You could attach the variables to UserData or application data to a graphics object that the already-executing function knew to check. The already-executing function would need to actively check for the updates. However, in order to escape from execution of the already-executing function in order to do the sending, you would need to have arranged that a callback be executed, such as a timer.
But probably you need something different than these.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Standard File Formats についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!