Borrar filtros
Borrar filtros

Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. Warning: Error updating ConstantLine. Execution of script mean as a functi

11 visualizaciones (últimos 30 días)
Dear all,
I only use one line code as below and then I got this warning which I have no idea. Could anybody give me a favor?
Thank you so much,
Best wishes,
Vivian Zhou
  2 comentarios
Xuanyi Zhou
Xuanyi Zhou el 27 de En. de 2024
Dear Walter Roberson,
Thank you for replying to me. I am using MATLAB 2022a and 2018b. Both of them cannot work this.
Finally, I changed the code as below and it works
% Create a figure
figure;
% Get the current x-axis limits
xLimits = xlim;
% Plot a horizontal dashed blue line at y = 4
yValue = 4;
plot(xLimits, [yValue, yValue], '--b');
Thank you so much.
Best wishes,
Vivian Zhou

Iniciar sesión para comentar.

Respuestas (1)

Dyuman Joshi
Dyuman Joshi el 26 de En. de 2024
Movida: Dyuman Joshi el 26 de En. de 2024
Given the warning message - I suspect that you have a overloaded the mean() function by naming a user-defined script as mean.
Check the output of
which mean -all
to find the location of the script, rename it and try again.
  4 comentarios
Dyuman Joshi
Dyuman Joshi el 27 de En. de 2024
You are welcome! Glad to have helped :)
If my answer solved your problem, please consider accepting the answer.
Stephen23
Stephen23 el 27 de En. de 2024
+1 well spotted, Dyuman Joshi. I got distracted by that odd warning message.

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by