MATLAB: Strange error on the source code

clear alldeclarationtrivialvariables

Matlab is telling me that my declaration of variables is invalid. I've tried putting a "clear all" before the declaration, but it still tells me there is an error in the code. Does anyone know the answer for this? It seems so trivial…

Best Answer

The part from
%%diferentes codificacoes
on downwards is not inside any "function". You cannot have a script in the same file you declare a function. You need to move that line through to the end into a different file.
Related Question