Hello everyone, i am trying to plot the following function in MATLAB2017a but it is taking way too long (over 12 hours and still nothing). measure and support are 10000*1 and 1*10000 double respectively. Any suggestions? the step before fplot takes ony few minutes..
opengl software
syms t
T0=1;
density(t)=((support.*(normpdf((support-psi(t))/sqrt(t)))*measure)/((normpdf((support-psi(t))/sqrt(t)))*measure))*(normpdf(psi(t)/sqrt(t))/(2*t^(3/2)));
fplot(density,[0 T0],'-k')
function y=psi(t)
y=(log(12/10)+0.5.*0.1.^2.*t-0.1.*t-0.05.*(1-exp(-t)))./0.1;
end

 채택된 답변

Walter Roberson
Walter Roberson 2018년 10월 5일

0 개 추천

fplot() does a lot of adaptive work and discontinuity detection work that can be a waste of time when you just want to see what the plot looks like. When you get into more complicated functions, it is common that what you should do is linspace() up a bunch of points and evaluate the function at the points and plot the results. You can start with lower number of points and increase the number according to how much time you are willing to spend and how "bumpy" the plot lots.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

질문:

2018년 10월 5일

답변:

2018년 10월 5일

Community Treasure Hunt

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

Start Hunting!

Translated by