"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.

 采纳的回答

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 个评论

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.
As always, my pleasure!
Rest assured that you are not the only person ever to do that.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Logical 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by