please solve problem index increase matrix dimension.
3 次查看(过去 30 天)
显示 更早的评论
%%%Total energy consumption
NumberOfNodes=225;
Etotal_DBR=0;
et=0
plot(NumberOfNodes(1:10:end),Etotal_DBR(1:225),'r--o','LineWidth',2)
xlabel('NumberOfNodes')
ylabel('Total Energy consumption in joules')
title('Total Energy consumption of the network')
hold on
legend('DBR' ,'Etotal_DBR')
axis([0 500 0 1200])
plot(x,y)
grid on
hold off
1 个评论
KSSV
2017-8-10
Your NumberOfNodes, Etotal_DBR are scalars (single number) and in plot you are treating them as a vector....
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Constants and Test Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!