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

3 visualizaciones (últimos 30 días)
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 comentarios
Prabha Kumaresan
Prabha Kumaresan el 7 de Nov. de 2017
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

Iniciar sesión para comentar.

Respuestas (1)

KSSV
KSSV el 7 de Nov. de 2017
Editada: KSSV el 7 de Nov. de 2017
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')

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by