How to pass values from GUI table to workspace

A=get(t,'Data');
% create double array from a cell array A
B=cell2mat(A);
% assign the value of the dot product to the variable 'result' in the workspace
assignin('base','result',B)...
is my code to show data in workspace though programming,,,but its not working out

답변 (1개)

Walter Roberson
Walter Roberson 2012년 12월 11일

0 개 추천

Which part of it is not working?
assignin('base') sets variables in the "base" workspace, which is the same workspace as the command line normally accesses. If you want to retrieve anything from the base workspace, you need to use
evalin('base', 'result')

댓글 수: 5

wen i use my above code,,my matlab is crashing
MATLAB itself is crashing? You mean the executable is exiting and generating a crash report?
Or do you mean that MATLAB is telling you there is an error, and you forgot to mention that fact to us, and you forgot to tell us what the error message is and which line it is occurring on ?
its generating crash report
Walter Roberson
Walter Roberson 2012년 12월 11일
편집: Walter Roberson 2012년 12월 11일
Please post the beginning of the crash report. Also, please use the debugger to step through your program to find out exactly which step is causing the crash.
thank u

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

카테고리

도움말 센터File Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

질문:

2012년 12월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by