How do I fix this error? Not enough input arguments.
古いコメントを表示
Im running this function:
function value = a_p(e)
%analysing power
a2 = [ ];
b2 = [ ];
%find value closest to randomly selected energy, e
[~,I] = min(abs(a2-e));
c2 = a2(I);
%find corresponding analysing power to that energy value
idx = find(a2 == c2);
bidx = b2(idx);
a_p = b2(idx);
value = a_p;
end
where a2 and b2 is just an array of data, I keep recieving the same error:
Not enough input arguments
Error in a_p (line 7)
[~,I] = min(abs(a2-e));
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Write Unit Tests についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!