Prev: Axes in GUI
Next: Axis and Textread Question
From: Jose on 28 Jun 2010 09:39 Hello guys again, i have a problem with the names of the figure, If i want to change the name of figure1 for other name is fine: set(figure(1),'Name','amplitude','Numbertitle','off')...but, muy problem is that I want to try to put a special name mixture of a string 'amplitude' plus a number: Example: a=[5 6 7] how can I show the names: amplitude a(1),i.e amplitude 5, amplitude a(2), i.e amplitude 6 and amplitude 7 in the figures (1), (2) and (3)? I think with the property 'Name' is not possible because only admit string, and my name is compose for a string=amplitude plus a number=a(x). Thanks
From: Andy on 28 Jun 2010 09:48 "Jose " <jose.l.vega(a)gmail.com> wrote in message <i0a8mb$2l9$1(a)fred.mathworks.com>... > Hello guys again, i have a problem with the names of the figure, > > If i want to change the name of figure1 for other name is fine: > > set(figure(1),'Name','amplitude','Numbertitle','off')...but, muy problem is > that I want to try to put a special name mixture of a string 'amplitude' plus a number: > > Example: > > a=[5 6 7] > > how can I show the names: amplitude a(1),i.e amplitude 5, amplitude a(2), i.e amplitude 6 and amplitude 7 in the figures (1), (2) and (3)? > I think with the property 'Name' is not possible because > only admit string, and my name is compose for a string=amplitude plus a number=a(x). > > Thanks Use num2str or sprintf.
From: someone on 28 Jun 2010 09:50 "Jose " <jose.l.vega(a)gmail.com> wrote in message <i0a8mb$2l9$1(a)fred.mathworks.com>... > Hello guys again, i have a problem with the names of the figure, > > If i want to change the name of figure1 for other name is fine: > > set(figure(1),'Name','amplitude','Numbertitle','off')...but, muy problem is > that I want to try to put a special name mixture of a string 'amplitude' plus a number: > > Example: > > a=[5 6 7] > > how can I show the names: amplitude a(1),i.e amplitude 5, amplitude a(2), i.e amplitude 6 and amplitude 7 in the figures (1), (2) and (3)? > I think with the property 'Name' is not possible because > only admit string, and my name is compose for a string=amplitude plus a number=a(x). > > Thanks Try something like: set(figure(1),'Name',['amplitude' num2str(a(1)],'Numbertitle','off')
From: Jose on 28 Jun 2010 09:55 "Andy " <theorigamist(a)gmail.com> wrote in message <i0a975$7dp$1(a)fred.mathworks.com>... > "Jose " <jose.l.vega(a)gmail.com> wrote in message <i0a8mb$2l9$1(a)fred.mathworks.com>... > > Hello guys again, i have a problem with the names of the figure, > > > > If i want to change the name of figure1 for other name is fine: > > > > set(figure(1),'Name','amplitude','Numbertitle','off')...but, muy problem is > > that I want to try to put a special name mixture of a string 'amplitude' plus a number: > > > > Example: > > > > a=[5 6 7] > > > > how can I show the names: amplitude a(1),i.e amplitude 5, amplitude a(2), i.e amplitude 6 and amplitude 7 in the figures (1), (2) and (3)? > > I think with the property 'Name' is not possible because > > only admit string, and my name is compose for a string=amplitude plus a number=a(x). > > > > Thanks > > Use num2str or sprintf. Please andy, can you help me with it? if i use 'Name','XXXX',...everything is a string...how can i use num2str or sprintf as a property instead of Name? Thanks
From: Jose on 28 Jun 2010 09:57
"someone" <someone(a)somewhere.net> wrote in message <i0a9b4$fle$1(a)fred.mathworks.com>... > "Jose " <jose.l.vega(a)gmail.com> wrote in message <i0a8mb$2l9$1(a)fred.mathworks.com>... > > Hello guys again, i have a problem with the names of the figure, > > > > If i want to change the name of figure1 for other name is fine: > > > > set(figure(1),'Name','amplitude','Numbertitle','off')...but, muy problem is > > that I want to try to put a special name mixture of a string 'amplitude' plus a number: > > > > Example: > > > > a=[5 6 7] > > > > how can I show the names: amplitude a(1),i.e amplitude 5, amplitude a(2), i.e amplitude 6 and amplitude 7 in the figures (1), (2) and (3)? > > I think with the property 'Name' is not possible because > > only admit string, and my name is compose for a string=amplitude plus a number=a(x). > > > > Thanks > > Try something like: > > set(figure(1),'Name',['amplitude' num2str(a(1)],'Numbertitle','off') Thank youvery much someone!!! |