I keep getting error using plot not enough input arguments.
1 次查看(过去 30 天)
显示 更早的评论
I keep getting error when I try to plot the following code and I don't really know what to do.
figure
plot(recall,precision)
xlabel("Recall")
ylabel("Precision")
grid on
title(sprintf("Average Precision = %.2f",ap))
Error using plot
Not enough input arguments.
3 个评论
回答(1 个)
Dyuman Joshi
2023-5-4
You need to sort your x data.
recallv = cell2mat(recall);
precisionv = cell2mat(precision);
[r,index] = sort(recallv);
p = precisionv(index);
figure
plot(r,p)
xlabel("Recall")
ylabel("Precision")
grid on
title(sprintf("Average Precision = %.2f",ap))
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!