Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   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
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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!



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.