I have a figure in Matlab, inside the figure i would like to write comments on the figure. the comment include latex formula; for example, I want to write this comment on my figure $$ \vec{R} = 2 $$
here is an example that I found when I searched;
clear all;
close all;
clc;
figure
ms = 8;
fontSize = 18;
xx = 0:.1:1;
plot(xx,sin(xx))
xlabel('P_{fa}', 'fontsize', fontSize);
ylabel('P_{m}', 'fontsize', fontSize);
I want it looks like as in the attached figure below:
Note: I searched in last questions that already answered, I found that I can write latex commands in the legend, title, axis ... but not when writing comments inside the figure.