Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



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=['CV 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!



