join words for a title in plot

1 visualización (últimos 30 días)
Gaetano Pavone
Gaetano Pavone el 30 de En. de 2020
Respondida: Mohammad Sami el 30 de En. de 2020
I would like to add a customized title to my plot:
name='function';
x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y)
title(['Plot of','name'],...
'FontSize',13,'FontWeight','normal');
but it doesn't work. How can I solve this?
  1 comentario
Mohammad Sami
Mohammad Sami el 30 de En. de 2020
You have put '' around name. That makes it a static char
name='function';
x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y)
title(['Plot of ',name],...
'FontSize',13,'FontWeight','normal');

Iniciar sesión para comentar.

Respuesta aceptada

Mohammad Sami
Mohammad Sami el 30 de En. de 2020
You have put '' around name. That makes it a static char
name='function';
x = 0:pi/100:2*pi;
y = sin(x);
plot(x,y)
title(['Plot of ',name],...
'FontSize',13,'FontWeight','normal');

Más respuestas (0)

Categorías

Más información sobre Audio I/O and Waveform Generation en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by