Path: news.mathworks.com!not-for-mail From: "Kian " <kianian@gmail.com> Newsgroups: comp.soft-sys.matlab Subject: Putting text containing variables into plot Date: Wed, 24 Apr 2013 18:32:09 +0000 (UTC) Organization: University of Manitoba Lines: 22 Message-ID: <kl98f9$qkq$1@newscl01ah.mathworks.com> Reply-To: "Kian " <kianian@gmail.com> NNTP-Posting-Host: www-06-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: newscl01ah.mathworks.com 1366828329 27290 172.30.248.38 (24 Apr 2013 18:32:09 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Wed, 24 Apr 2013 18:32:09 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 3064487 Xref: news.mathworks.com comp.soft-sys.matlab:794273 How can I put a text into my plot which passes computed values in there? For instance, I have computed my parameters to be: pars = 0.0005 42.1963 Now I want to put a text in an appropriate position in my plot (where it does not block the figure content), and pass pars(1) and pars(2) in there. My formula is omega(d) = exp(-pars(1)*d^pars(2)) So, I want to have Matlab to put that for me in the plot as: omega(d) = exp(-0.0005*d^pars(2)) I have already tried to put it in the title by: title([ '\omega(d)=exp (' , num2str(pars(1),'%4.5f') , ' d^' , (num2str(pars(2))), ')' ]) But still, the problem is pars(2) is not completely powered, and only its first digit (4) is powered. I am really interested to put it rather as a text somewhere in my plot. I appreciate any help.