I am getting error while plotting graph from this command figure;plot(sum_n, '--bs',sum_vec,'--bs')

조회 수: 9 (최근 30일)
figure;
plot(sum_n, '--bs', sum_vec,'--bs')
i am getting the message
"Data must be a single matrix Y or a list of pairs X,Y".
how to get rid of it.
  댓글 수: 2
Prabha Kumaresan
Prabha Kumaresan 2017년 11월 7일
sum_n is the output of (no of users vs throughput) in NOMA sum_vec is the output of (no of users vs throughput) in OFDMA I want to compare both NOMA and OFDMA in the same graph

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

답변 (1개)

KSSV
KSSV 2017년 11월 7일
편집: KSSV 2017년 11월 7일
You cannot plot two plots at a time with out x data..that's why error....you should try like below:
x1 = 1:length(sum_n) ;
x2 = 1:length(sum_vec) ;
figure;
plot(x1,sum_n, '--bs',x2, sum_vec,'--bs')

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by