필터 지우기
필터 지우기

how to plot equation in annotation

조회 수: 2 (최근 30일)
Julia
Julia 2016년 4월 27일
편집: Julia 2016년 4월 28일
I have fitted a lognormal distribution using lognfit and want to add the equation in an annotation to the graph including fractions, subscripts etc. The equation is the following: f(x) = 1/sqrt(2 pi) 1/(x sigma) exp(-(1/2sigma^2)(loge(x)-mu)^2 ). I have tried the first part of the equation but am struggeling with the display of the somewhat complex equation
mu = parmhat(1)
sigma = parmhat(2)
annotation('textbox', [.38 .6 .1 .1],'BackgroundColor','w','FontSize',fs-6, ...
'String', ['f(x) = '$\displaystyle\frac{1}{(x{',num2str(mu),'}} /sqrt 2 /pi)}$ exp('$displaystyle\frac {1} {x{',num2str(sigma),'} '], 'Interpreter', 'latex');

답변 (0개)

카테고리

Help CenterFile Exchange에서 Interpolation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by