fplot taking too long. any suggestions?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Ahmed Menouni
el 5 de Oct. de 2018
Respondida: Walter Roberson
el 5 de Oct. de 2018
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
0 comentarios
Respuesta aceptada
Walter Roberson
el 5 de Oct. de 2018
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 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Surface and Mesh Plots en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!