필터 지우기
필터 지우기

Why do I get the error message 'Attempt to execute SCRIPT as a function' ?

조회 수: 3 (최근 30일)
nani kalyan
nani kalyan 2015년 5월 24일
답변: Image Analyst 2015년 5월 24일
i am integrating the two columns like,
data=xlsread('book1.xlsx');
P=data(3:end,1);
t=data(3:end,2);
fun=(P.*t);
i=integral(fun,0,72);
i am not getting, please help me friends....
Actually for the excel file i need to integrate the column1 and 2 with a limits of 0 to 72;
  댓글 수: 1
Jan
Jan 2015년 5월 24일
Please post the complete error message. Notice that we cannot guess, which command causes the problem, while this information appears in your command window.

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

답변 (2개)

Jan
Jan 2015년 5월 24일
If the current folder contains the M-file, which contains the help text of a built-in function, calling this function fails with this error message. Therefore it is recommended not to set the current folder to a folder inside Matlab's root folder. See:
doc matlabroot

Image Analyst
Image Analyst 2015년 5월 24일
Your m-file is not called data.m or integral.m is it?

카테고리

Help CenterFile Exchange에서 Adding custom doc에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by