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!