How to get var from base workspace in test sequence
Afficher commentaires plus anciens
How to get var from base workspace in test sequence
6 commentaires
Rik
le 20 Août 2024
I would never advise the use of evalin, especially not in a tester.
What are you actually trying to achieve? The answer below answers your question, but I expect you should be asking a different question.
(also, if the answer solves your question, you should click the 'accept answer' button)
浩 程
le 20 Août 2024
浩 程
le 20 Août 2024
浩 程
le 20 Août 2024
"I want to use code to iterate a variable in a test sequence, which requires getting the change value from the workspace."
Pass it as an argument.
The approach you are attempting has a very strong smell to it: https://en.wikipedia.org/wiki/Code_smell
Rik
le 20 Août 2024
Why don't you supply the list of test variables in a cell array?
Making your test cases static helps keeping your tests stable. Without a consistent test, it is not possible to have a good regression test.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Inputs dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
