-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathassembly.m
43 lines (36 loc) · 1.18 KB
/
assembly.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
%{
Full Assembly of Model Automatic Fittings
%**********************************************************************
Author: https://github.com/xinyangyuan
%**********************************************************************
%}
clear
%--------------------------------------------------------------------------
% Load Raw Data
%--------------------------------------------------------------------------
load('rawData.mat')
stress = fs_s_535_1;
strain = e_535_1;
%--------------------------------------------------------------------------
% Fitting
%--------------------------------------------------------------------------
% Define the fitting class
fit = fitting(stress,strain);
% Set the scaling
%fit.scaleBool = [0,0,0,0,0,0,0,0]; %turn off scales
% Set the boundary with manual input. class default is 'positive'
%fit.constriants = 'positive';
fit.constriants = 'manual';
fit.boundary = [1,5;1,5;1,200;1,200;1,200;500000,700000000;1,100;1,100];
% Set max number of evaluations/generations
fit.lamda = 500;
fit.g_max = 50;
% Run the fitting process
%fit.display = 1;
tic
fit.run()
toc
% Obtain the best result
[w_best,best_fitness] = fit.result();
%fit.best
%fit.best_fitness