How to use a workspace variable in editor
조회 수: 11 (최근 30일)
이전 댓글 표시
I'm creating a function and I want to input a variable from my workspace in the function, with it being constant.
Is there a way I can "call" the variable from the workspace without having to define the variable at the beginning of the editor?
Thanks for your help
Joaquin
댓글 수: 0
답변 (2개)
Paulo Silva
2011년 2월 15일
Why don't you supply that variable as argument for the function when you call the function from workspace?
MyFunction(MyConstantVariable)
댓글 수: 0
Andreas Goser
2011년 2월 15일
I'd say you need to work with function arguments:
For the sake of completeness, the is also the EVALIN command, but I do not recommend it.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!