Info
此问题已关闭。 请重新打开它进行编辑或回答。
I am trying to write some equations in the plot in MATLAB but, i am getting error and it's not working.
1 次查看(过去 30 天)
显示 更早的评论
I am trying interpret equations using Latex. Here's my code and the figure attached.
z= 0:0.01:6
q=0.5*erfc(z./sqrt(2))
u=(1./((sqrt(2*pi)).*z)).*exp((-z.*z)./2)
semilogy(z,q,'color','k','LineWidth',2);
hold on;
semilogy(z,u,'--');
axis([0,6,10^(-8),1])
xlabel('z \rightarrow ' );
ylabel('Overbound approximation not applicable for small z');
title('The function Q(z) and an overbound')
str=strcat(' Q(z) \downarrow')
str1= strcat('downarrow','$${{\frac{(1)}{\sqrt{2\pi}}{{\frac{\exp{(-z)^2}}(2)}$$')
text(65,85,str);
text(1,0.6,str1,'Interpreter','Latex','FontSize',14);
Here is my error: str =
Q(z) \downarrow
str1 =
downarrow$${{\frac{(1)}{\sqrt{2\pi}}{{\frac{\exp{(-z)^2}}(2)}$$
Warning: Unable to interpret LaTeX string "downarrow$${{\frac{(1)}{\sqrt{2\pi}}{{\frac{\exp{(-z)^2}}(2)}$$" >>

Attached is the picture of the plot. i.e how it should look like.
0 个评论
回答(1 个)
Walter Roberson
2018-2-1
编辑:Walter Roberson
2018-2-1
You are missing several } in str1
And remember the \ before the downarrow
0 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!