Index exceeds matrix dimensions

조회 수: 7 (최근 30일)
Teju
Teju 2019년 8월 21일
댓글: Stephen23 2019년 8월 21일
Hi,
Iam getting error at following place, please suggest to resolve.
Index exceeds matrix dimensions.
Error in uisignalbuilder_speed/Import_Excel (line 595)
timefromworkspace = evalin('base','speedfromworkspace(:,1);');%test
function Import_Excel()
a=uigetfile('*xls');
name1=cellstr(a);
[~,a] =xlsread(name1{1});% read data from excel file%test replaced 1
% removeallsignals();%TEST
evalin('base', 'clear speedfromworkspace;');
assignin('base','speedfromworkspace',a);
removeallsignals();
timefromworkspace = evalin('base','speedfromworkspace(:,1);'); // GETTING ERROR
HERE
speedfromworkspace = evalin('base','speedfromworkspace(:,2);');
  댓글 수: 2
Adam
Adam 2019년 8월 21일
Best option is to debug, examine the workspace, etc, although all the evalin and assignin operations make it more difficult than it should be to debug code.
Stephen23
Stephen23 2019년 8월 21일
Best option is to rewrite your code to not mess around in other workspaces.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by