Call function with other function

1 Ansicht (letzte 30 Tage)
Skydriver
Skydriver am 5 Sep. 2019
Kommentiert: Rik am 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 Kommentar
Rik
Rik am 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?

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by