Traditional Culture Encyclopedia - Traditional culture - Who will use matlab to solve SBM model
Who will use matlab to solve SBM model
Please refer to the following procedure:
% curvefitLogistic.m
% in practical application, only when the obtained biological data is proved to have the law of logistic curve can the fitting result be
% is meaningful, and the following set of data has the law of logistic curve!
n =[3929 5308 7240 9638 12866 17069 23 192 3 1443 38558 50 156 62948 ...
75995 9 1972 1057 1 1 122775 13 1669 150697 179323 203 185 226500];
t = 1790: 10: 1980;
% draw the original data map
plot(t,N,t,N,' r* ')
continue
Construction of% logic function
func = @(beta,x) beta( 1)。 /( 1+(beta( 1)/N( 1)- 1)* exp(-beta(2)*(x- 1790));
% Key: Selection of optimization initial value: beta0( 1) is the maximum value of the function, and the smaller beta0( 1) is, the better, so we can directly take 0 here.
% because of gauss-Newton algorithm and gauss-
% Newton's improved algorithm Marquardt method, these two algorithms only select a set of initial values close to the actual value.
When the value of% is k, a, b, the convergence of iterative process is good, that is, the discovery value of k, a, b can minimize the value of r!
beta 0 =[max(N)0];
% lsqcurvefit call
[beta,resnorm,residual,exitflag,output]= lsqcurvefit(func,beta0,t,N);
- Previous article:Is there a good museum of traditional Chinese medicine in Shenzhen?
- Next article:What does Pufan mean?
- Related articles
- When will Fox Demon Xiao Hong Niang Mugure Chapter be updated?
- What are the specialties of Tengchong? What are the specialties of Tengchong?
- After my computer was turned on, the sound of the speaker was very low. Wearing headphones is also a ring, why, please ask.
- What if the city people die?
- What positions are included in the early, middle and late stages of animation production?
- Why do most women choose forbearance in marriage?
- Can the best museum in Chengdu, the reappearance of China's ancient civilization, become a golden memory?
- Brined meat brined before the matters that should be noted?
- What outdoor activities are fun in Ireland?
- The difference between traditional marketing and marketing objectives