How can I shrink the time of getting the results please?
이전 댓글 표시
I run the following code for 13 days until I got the results so could anyone advise me if there is any truck that I can use to shrink the time please? Because I need to run the code for different values!
function FisherN01analyticalsmallomega
y0=1;
a=1
c=50;
b = 2.5
t =(0:0.1:10000);
y = logisticOscilanalytical(t,c,y0,b,a);
Y = @(T) interp1(t,y,T);
g = @(t) ( (b.*sin(b.*t) + cos(b.*t).* (2.*Y(t)./c)).^2./(a.^2.*sin(b.*t).^3 .* (Y(t) - (Y(t).^2).^2))) );
t= (0:10:10000);
N = length(t);
JT = zeros(1,N);
for i = 1:N
JT = integral(g,0,t(1,i),'ArrayValued',true);
end
figure(1)
plot(t,JT,'-','LineWidth',2)
1;
% function y = logisticOscilanalytical(t, c, y0, b, a)
% ee = exp( (a/ b) * (1- cos( b*t)));
% y = (-c.* y0.* ee)./ ( (y0 - c) - y0.* ee);
% end
댓글 수: 2
Jan
2015년 5월 28일
I've formatted the code, because it was not readable. Please use the "{} Code" button. Do not post code which is commented out - this confuses the readers.
Avan Al-Saffar
2015년 5월 28일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!