Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Function definitions are not permitted in this context.

3 visualizaciones (últimos 30 días)
Praveen  kumar
Praveen kumar el 11 de Mzo. de 2016
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
% minutiae function consists logic to check bifurcation and termination points function y=minutie(x) i=ceil(size(x/2)); if x(i,i)==0; y=0; else y=sum(x(:))-1; end

Respuestas (1)

Jan
Jan el 11 de Mzo. de 2016
Functions can be defined in "function files" only: Files which start with the expression "function". There you can define a main function (called as the file), sub-functions, which are visible for the main-function also, and nested functions, which are visible for the parent function.
You cannot define functions inside scripts (M-files which donot start with "function") or in the command line.
Note: This topic has been discussed repeatedly and searchuing in the forum or the internet for the error message would reveal a solution very fast.
  2 comentarios
Praveen  kumar
Praveen kumar el 11 de Mzo. de 2016
i didn't understand
Ced
Ced el 11 de Mzo. de 2016
Editada: Ced el 11 de Mzo. de 2016
The short answer is: You cannot define a function inside an normal script.
Googling for it will give you lots of detailed answers.

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by