필터 지우기
필터 지우기

please solve problem index increase matrix dimension.

조회 수: 3 (최근 30일)
Junaid Qadir
Junaid Qadir 2017년 8월 10일
편집: José-Luis 2017년 8월 10일
%%%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
KSSV 2017년 8월 10일
Your NumberOfNodes, Etotal_DBR are scalars (single number) and in plot you are treating them as a vector....

댓글을 달려면 로그인하십시오.

답변 (1개)

José-Luis
José-Luis 2017년 8월 10일
편집: José-Luis 2017년 8월 10일
Both NumberOfNodes and Etotal_DBR are scalars and it seems that you want to treat them as arrays and actually do some indexing.
That ain't gonna jive.
For the obsessive: I realize a scalar is a 1x1 array.

카테고리

Help CenterFile Exchange에서 Sparse Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by