how to comment part of the title?

How can i comment out the part below in brackets? title('Read-range at [name of point] of the antenna')
i want to eventually have a variable there and each time create my plot, to give it a correct title. For example, "Read-range at point A of the antenna", "Read-range at point B of the antenna", C, D, and so on.
Thanks.
Lala~

Réponses (3)

Azzi Abdelmalek
Azzi Abdelmalek le 26 Fév 2013
Modifié(e) : Azzi Abdelmalek le 26 Fév 2013

0 votes

str='A'
title(sprintf('Read-range at %s of the antenna',str))
the cyclist
the cyclist le 26 Fév 2013

0 votes

I do that like this
>> stringVariable = 'truly';
>> title(['This title is going to be ',stringVariable,' awesome'])
lala
lala le 26 Fév 2013

0 votes

Awesome! Both solutions work beautifully! Thanks~.

1 commentaire

Jan
Jan le 27 Fév 2013
Then please vote for one and accept the other answer, such that other readers see, that the problem is solved. Thanks.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Design, Analysis, Benchmarking, and Verification dans Centre d'aide et File Exchange

Produits

Question posée :

le 26 Fév 2013

Community Treasure Hunt

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

Start Hunting!

Translated by