Error function definitions are not permitted in this context

16 vues (au cours des 30 derniers jours)
Hi,
Im trying to execute timbre toolbox on Mathlab 2017a, however there is an error ..
Can you help me in understanding this error? Thank you
Sem Título.jpg
  12 commentaires
Maria de São Luís Castro
Q.Is the first one answered regarding the function definition error?
-->The mistake here as I understood is that the script was run in the command window instead of editor...However as I said before I selected the script from the editor window and I don't know why it appears on the command window in the end...
Q.Do you understand the comments by myself and Guillaume regarding the config_s error?
-->Yes, it could be a function..however the only path required in the script is to define "w_Directory"
Q.Now for your 3rd question, the line you're asking about (copied below) is a function definition that exists in an m file. FILE_s is an output that is defined somehwere within the function Gget_filelist().
--> Right, it should be defined but is not
Thank you
Adam Danz
Adam Danz le 4 Nov 2019
ahh... in that case, i'm not sure what to recommend if the output is not defined within the function. Is there a typo or any indication of what the output should be?

Connectez-vous pour commenter.

Réponse acceptée

Adam Danz
Adam Danz le 3 Nov 2019
Modifié(e) : Adam Danz le 4 Nov 2019
It appears that you're running copy-pasted code directly from the command window. Function definitions are not supported from the command window. The function must be defined from within the editor. So, you'll need to run your file from the editor, not from the command window.
Here are some tips to run parts of code from within the editor.

Plus de réponses (0)

Catégories

En savoir plus sur Environment and Settings dans Help Center et File Exchange

Produits


Version

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by