Add specific numbers to a plot

I have a code that I am calculating some values. I would like to add this values to a spesific point in my plot (I mean I would like to add upper left the folowing: 'A = 5', (to a next row 'B= 10' etc). I think I should use num2str(A) function but I do not know how.
Could you help me?

 Accepted Answer

KSSV
KSSV on 31 Jan 2021
Read about the function text.

3 Comments

I have tried this but the problem is tha the "results" are not showing in the same row.
I have tried this:
str={{'A=', {num2str(A)}}
text(3,8,str)
but no use.
Could you help me?
text(3, 8, sprintf('A=%g', A))
Thank you !!

Sign in to comment.

More Answers (0)

Categories

Asked:

on 31 Jan 2021

Commented:

on 31 Jan 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!