필터 지우기
필터 지우기

How to get the selected variable in the workspace ?

조회 수: 5 (최근 30일)
JC CJ
JC CJ 2012년 11월 5일
Hi ! I want to get the selected variable in the workspace.
I know that openvar function is double-click a variable in the Workspace browser, but I am looking for the simple click function (the selected variable).
Thanks for your help.
  댓글 수: 2
Arthur
Arthur 2012년 11월 5일
What do you mean with "getting" the selected variable? Should it be opened in the variable editor? And what's wrong with double clicking?
JC CJ
JC CJ 2012년 11월 5일
편집: JC CJ 2012년 11월 5일
No, I don't want to open it in the variable editor
For example, I select variable var1 in my workspace with one click on it. Its name 'var1' now appears in white over blue in the workspace. Then I am looking for the following function:
selected_variable = get_selected_variable_in_workspace_function();
% then I use it like:
plot(selected_variable)
Is it clearer ? Does this get_selected_variable_in_workspace_function exit in Matlab ?

댓글을 달려면 로그인하십시오.

답변 (1개)

Arthur
Arthur 2012년 11월 5일
I'm not aware of any such function. However, you can simply drag and drop the variable in the command window.
If it's for plotting only: simply hit the plot button.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by