Effacer les filtres
Effacer les filtres

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

3 vues (au cours des 30 derniers jours)
nani kalyan
nani kalyan le 24 Mai 2015
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 commentaire
Jan
Jan le 24 Mai 2015
Please post the complete error message. Notice that we cannot guess, which command causes the problem, while this information appears in your command window.

Connectez-vous pour commenter.

Réponses (2)

Jan
Jan le 24 Mai 2015
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 le 24 Mai 2015
Your m-file is not called data.m or integral.m is it?

Catégories

En savoir plus sur Adding custom doc dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by