How to access and change variables in workspace

4 views (last 30 days)
tommsch
tommsch on 30 Nov 2020
Edited: tommsch on 30 Nov 2020
I need to access variables in a workspace which are in a workspace down the stack. And I need to do this in a function - Thus, start the debugger, select the workspace manually and change the variable is not the thing I want to do. Thus, I need to do something like
evalin( 'caller', evalin( 'caller', evalin( ..., variablename) ) ... ).
I am open for hacky solutions too.
Furthermore: Please do not tell me any of the following: "Do not use eval", "Do not use global variables", "Don't do this" etc.. I am not a novice programmer (and hate that in similar questions the answer is never given, but only told that one should not do it).
  7 Comments
tommsch
tommsch on 30 Nov 2020
Edited: tommsch on 30 Nov 2020
I am not fully satisfied with the Matlab testing framework, since I think its quite verbose and does lack some important features, expecially for testing scientific software. Thus, I am mostly writing extra assertions on top of the matlab framework. (Edit: assertition framework would thus be the better name)
The thing I want to do is tracing.

Sign in to comment.

Answers (0)

Categories

Find more on Programming Utilities in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!