Call function with other function

1 vue (au cours des 30 derniers jours)
Skydriver
Skydriver le 5 Sep 2019
Commenté : Rik le 5 Sep 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 commentaire
Rik
Rik le 5 Sep 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?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Workspace Variables and MAT-Files dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by