error using plot()

2 visualizaciones (últimos 30 días)
Krishnendu Mukherjee
Krishnendu Mukherjee el 2 de Feb. de 2012
Respondida: Massa Tolba el 18 de Feb. de 2021
h_MeanCostPlot=plot(MeanCost,'k:','LineWidth',1.5,'YDataSource','MeanCost');
im getting error while using this command in m-file.
is the syntax correct?
  2 comentarios
Wayne King
Wayne King el 2 de Feb. de 2012
Please show the error message you are getting
Krishnendu Mukherjee
Krishnendu Mukherjee el 2 de Feb. de 2012
Error using ==> plot
Invalid line property: 'YDataSource'.

Iniciar sesión para comentar.

Respuesta aceptada

Wayne King
Wayne King el 2 de Feb. de 2012
Not sure why that is causing you a problem, (maybe a version problem), but try
h_MeanCostPlot=plot(MeanCost,'k:','LineWidth',1.5);
You should not need 'YDataSource' here unless you want to refreshdata()?
Does this work for you?
x = randn(100,1);
h = plot(x,'k:');
set(h,'YDataSource','x');
What version of MATLAB are you using?
  11 comentarios
Krishnendu Mukherjee
Krishnendu Mukherjee el 2 de Feb. de 2012
if any ready file available only and only then i can installed that property.i myself cant make that function
Walter Roberson
Walter Roberson el 2 de Feb. de 2012
No, there is no download or toolbox that will add that property to MATLAB 6.5

Iniciar sesión para comentar.

Más respuestas (1)

Massa Tolba
Massa Tolba el 18 de Feb. de 2021
Error in Q1 (line 9)
plot(i,A)
What should i do with this error

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by