Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Pass string to function to increment figure number & figure title
Replies: 2   Last Post: Sep 14, 2013 1:23 PM

 Messages: [ Previous | Next ]
 Kenneth Potter Posts: 11 Registered: 2/24/05
Re: Pass string to function to increment figure number & figure title
Posted: Sep 14, 2013 1:23 PM

dpb <none@non.net> wrote in message <l0subu\$tgg\$1@speranza.aioe.org>...
> On 9/12/2013 11:32 AM, Kenneth wrote:
> ...
>

> > ... I would like to add two additional inputs to the function, a
> > number, 1,...,n which increments the command
> >
> > figure( insert number here)
> >
> > and also a string - i.e. device number which updates the title of the
> > figure
> >
> > h=title('Results for INPUT DEVICE NUMBER HERE')
> >
> > I would appreciate any help and thank everyone in advance for theory
> > time and suggestions. Apologies if this is trivial but my exposure to
> > MATLAB is limited.

> ...
>

> > function [Central_diff, Exact_point] = Tangent(location, Cdata , Vdata)
> ...
>
> function [C,E] = Tangent(location,Cdata,Vdata, fignum, device)
> ...
> figure(fignum)
> % Actually, rarely is there a need for the number itself; simply use
>
> figure
>
> % will increment to the next available number automagically so
> % could do w/o the fignum argument in all likelihood.
> ...
>
> t=['C-V Curve with Central Difference & Point Tangent ' num2str(device)];
> title(t)
> ...
>
> That's all there is to it...
>
> --

Hi,

That's great thank you very much!

Date Subject Author
9/12/13 Kenneth Potter
9/12/13 dpb
9/14/13 Kenneth Potter