"Not Enough Input Arguments" Error

Hello,
I am working with a code where I am stuck with a "Not Enough Input Arguments" error, even though it looks like the input arguments are listed. Specifically:
function [primeArray hR fA c] = proprioDPrimeAnalysis(oneCM, twoCM, threeCM, fourCM)
diffInd = find(oneCM(:,1) < -0.001);
the second line defining 'diffInd' causes the error. However, 'oneCM' is already defined as a 30x2 double array in the workspace:
0 0
0 0
0 0
0 0
-0.01 0
-0.01 0
0 1
0 1
0 0
-0.01 0
-0.01 1
0 0
0 1
0 1
-0.01 1
0 0
-0.01 0
-0.01 1
0 0
-0.01 0
-0.01 1
-0.01 1
-0.01 0
-0.01 1
0 0
-0.01 0
0 0
-0.01 1
-0.01 0
0 0
Please let me know if I am missing something, or if there is more I can provide.
Thank you.

 Respuesta aceptada

Star Strider
Star Strider el 31 de Jul. de 2018
How are you calling your ‘proprioDPrimeAnalysis’ function?
You must call it with all the input arguments as:
[primeArray hR fA c] = proprioDPrimeAnalysis(oneCM, twoCM, threeCM, fourCM);
It will not magically pick up any variables from your workspace, unlike anonymous functions.

2 comentarios

Andrew Levitsky
Andrew Levitsky el 31 de Jul. de 2018
D'oh! I was just running it from inside the Editor window. Thank you, I called the variables and it ran without error. Thank you for your help.
Star Strider
Star Strider el 31 de Jul. de 2018
As always, my pleasure!
Rest assured that you are not the only person ever to do that.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Productos

Preguntada:

el 31 de Jul. de 2018

Comentada:

el 31 de Jul. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by