-
Notifications
You must be signed in to change notification settings - Fork 0
/
StretchProfile.m
99 lines (91 loc) · 2.2 KB
/
StretchProfile.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
function [t,lam] = StretchProfile(i,n,varargin)
%[t,lam] = StretchProfile(i,n,varargin)
%% Input argument
%defulats
must_point = 'off';
nInputs = nargin;
if nInputs == 3
must_point = varargin;
end
%% switch between default loading cases
switch i
case 1
load = [0, 1;
10,1.15;
];
case 2
load = [0, 1;
10, 1.1;
20, 1];
case 3
load = [0, 1;
10, 1.1;
100, 1.1];
case 4
load = [0, 1;
10, 1.1;
20, 1;
30, 1.1
40, 1;
50, 1.1;
60, 1;
70, 1.1;
80, 1;
90, 1.1;
100, 1];
case 5
load = [0, 1;
0.001, 1.01;
15, 1.01;
15.001, 1.02;
30, 1.02;
30.001, 1.04;
45, 1.04;
45.001, 1.06;
75, 1.06;];
case 6
load =[0, 1;
10, 1.1;
40, 1.1;
50, 1;
100, 1];
case 7
load =[0, 1;
10, 1.02;
20, 1;
30, 1.04;
40, 1;
50, 1.06;
60, 1;
70, 1.08;
80, 1];
case 8
load =[0, 1;
10, 1.04;
30, 1.04;
40, 1.08;
80, 1.08;
100, 1];
case 9
load = [0, 1;
6, 1.06;
906, 1.06;
912, 1];
case 10
load = [0, 1;
6, 1.06;
906, 1.06;
912, 1
922,1.1;
];
end
%% Interpolation of the load curve
t = linspace(0, max(load(:,1)),n)';
if strcmp(must_point,'on')
for i = 1:length(load(:,1))
[~, index] = min(abs(t-load(i,1)));
t(index) = load(i,1);
end
end
lam = interp1(load(:,1),load(:,2),t,'linear');
end