How to get var from base workspace in test sequence
Mostrar comentarios más antiguos
How to get var from base workspace in test sequence
6 comentarios
Rik
el 20 de Ag. de 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)
浩 程
el 20 de Ag. de 2024
浩 程
el 20 de Ag. de 2024
浩 程
el 20 de Ag. de 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
el 20 de Ag. de 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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Inputs en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
