필터 지우기
필터 지우기

error on 'tables=xl​sread(file​name);'

조회 수: 1 (최근 30일)
Allan N
Allan N 2019년 2월 19일
댓글: Allan N 2019년 2월 23일
I am running 2013b version of matlab and recently upgraded to windows10 from windows 7 with excel2016 (previously excel2011). I am now getting error on this xlsread line, and was wondering if anyone might have suggestions as to why this error is now appearing?
  댓글 수: 1
Steven Lord
Steven Lord 2019년 2월 19일
What is the full text of the error message you receive? Include all the text displayed in red, and if there is also some text displayed in orange show that as well (please indicate which sections are displayed in red and which in orange.)

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

답변 (5개)

Allan N
Allan N 2019년 2월 19일
all in red
"undefined function or variable 'filename'.
Error in Template (line 25)"

Allan N
Allan N 2019년 2월 21일
I'm attaching the screenshot.

Image Analyst
Image Analyst 2019년 2월 21일
table is a predefined reserved function. You should not, and maybe cannot, assign the results of a call to xlsread() to it. Call it something else, like data.
Secondly, don't call xlsread() all those extra times - it just takes more time. You can get temperature, etc from "data" - the entire array as read in from your first call to xlsread().

Allan N
Allan N 2019년 2월 22일
Untitled.jpgHere, I'm just trying to execute the command to xlsread(), and I'm getting an unspecified error. I'm not sure why.
  댓글 수: 1
Image Analyst
Image Analyst 2019년 2월 22일
Well this time it's saying "unspecified error". That could be anything.
Please attach the m-file and the xlsx workbook file.

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


Allan N
Allan N 2019년 2월 22일
I'm attaching the m file and a xlsx file.
Thank you for your help!
  댓글 수: 2
Image Analyst
Image Analyst 2019년 2월 23일
Well I got down to line 94 when it said this:
'smooth' requires Curve Fitting Toolbox.
Error in TemplateHan (line 94)
intensity(:,n2)=smooth(intensity(:,n2),.10,'lowess');
so I got past the problem line for you. I think it must be some kind of path problem, like the file is not where you're specifying it to be.
Allan N
Allan N 2019년 2월 23일
Wow! That's great! Are you running Win 10? The m-file runs without errors on Win 7. I think there is a difference in how matlab executes the 'xlsread(filename)' command in the two OS. I have both the m-file and xlsx file in the same directory, but in Win 10, Matlab can't find the xlsx file.

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

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by