join words for a title in plot

조회 수: 1 (최근 30일)
Gaetano Pavone
Gaetano Pavone 2020년 1월 30일
답변: Mohammad Sami 2020년 1월 30일
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
Mohammad Sami
Mohammad Sami 2020년 1월 30일
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');

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

채택된 답변

Mohammad Sami
Mohammad Sami 2020년 1월 30일
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');

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Audio I/O and Waveform Generation에 대해 자세히 알아보기

태그

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by