Borrar filtros
Borrar filtros

Call function with other function

2 visualizaciones (últimos 30 días)
Skydriver
Skydriver el 5 de Sept. de 2019
Comentada: Rik el 5 de Sept. de 2019
I have function with the name file with the name SS14_EQS.m and I will call for computing using RunSS14_EQS.m.
But the comment : Function definitions in a script must appear at the end of the file.
Move all statements after the "SS14_EQS" function definition to before
the first local function definition.
Is there any one can help me?
Thanks
  1 comentario
Rik
Rik el 5 de Sept. de 2019
The function in RunSS14_EQS is not at the end of the script file. You can put functions in script files to have them available as local functions, but you can't put any code after the function/functions.
The function in RunSS14_EQS will likely not run, because the statements inside it are only valid if they are functions on your path, and setting them as variables is likely not allowed on your release. You are also not calling that local function.
The SS14_EQS function in its own file is also shadowed by the internal function, meaning it will not be called.
The clc,clear all,close seems unnecessary (and mlint is probably giving you a warning).
So the question is this: what are you trying to do? Have you already done a tutorial for how to use Matlab?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB Compiler en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by