How can I make a variable span multiple functions for nested structuring?

17 views (last 30 days)
I am recording and analyzing audio signals in real time and I need an index to everytime make a segmentation. I cheked up the documentation but I didn't find anything on how to, in poor words, make the variable "appearing cyan".

Accepted Answer

Stephen23 on 1 Jul 2021
Edited: Stephen23 on 1 Jul 2021
How to make a variable "cyan" (these are called shared variables) is explained here:
In general, the shared variable must be defined in the parent workspace and referred to (or redefined) in the nested function. For more details, read the paged linked above.
Because this forum does not use the same highlighting as the installed MATLAB application, here is a screenshot (this function is also attached) showing the cyan shared variable:
Fulvio Cordella
Fulvio Cordella on 2 Jul 2021
Thank you for your patience. I am not able to share my code because I am not possessing the device in which I wrote it for several days. I would have posted it, indeed. Anyway, thank you, I noticed other topics in other q&a and blogs that tell your same answer so I am gonna mark it as best answer :)

Sign in to comment.

More Answers (0)




Community Treasure Hunt

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

Start Hunting!