-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMaC.m
29 lines (27 loc) · 1.55 KB
/
MaC.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
function fitresult = MaC
Angles = 0:2.5:25;
Mach_Numbers = [1.5 1.75 2 2.5 3 3.5 4 4.5 5];
Cone_Mach_Numbers = [1.5 1.4866884 1.4579318 1.4197316 1.3748579 1.3248992 1.2707392 1.2127162 ...
1.1506488 1.0837313 1.0100703;... Mach 1.5 Row D
1.75 1.7340335 1.7004643 1.6568043 1.6064462 1.5513727 1.4925484 1.4306418 ...
1.3657361 1.2976505 1.2259024;... Mach 1.75 Row D
2 1.9808615 1.9415254 1.8912335 1.8340453 1.7721933 1.7068837 1.6386764 ...
1.5677572 1.4940884 1.4174680;... Mach 2 Row D
2.5 2.4729472 2.4193976 2.3528628 2.2788768 2.2001554 2.1179422 2.0327606 ...
1.9448503 1.8543543 1.7613748;... Mach 2.5 Row D
3 2.9627600 2.8913832 2.8048038 2.7101402 2.6103929 2.5067511 2.3997895 ...
2.2899646 2.1777409 2.0635830;... Mach 3 Row D
3.5 3.4500939 3.3571597 3.2467499 3.1275136 3.0025569 2.8731152 2.7400668 ...
2.6043443 2.4669130 2.3286833;... %Mach 3.5 Row D
4 3.9347700 3.8164543 3.6783916 3.5305680 3.3761469 3.2166972 3.0537628 ...
2.8889908 2.7239783 2.5600783;... %Mach 4 Row D
4.5 4.4166246 4.2690580 4.0994611 3.9189007 3.7307750 3.5374323 3.3414321 ...
3.1453333 2.95136777 2.7612386;... %Mach 4.5 Row D
5 4.8955305 4.7148078 4.5097079 4.2921847 4.0662669 3.8355932 3.6040616 ...
3.3752078 3.1517935 2.9356870];
%% Fit: 'untitled fit 1'.
[xData, yData, zData] = prepareSurfaceData( Angles, Mach_Numbers, Cone_Mach_Numbers );
% Set up fittype and options.
ft = 'linearinterp';
% Fit model to data.
[fitresult, gof] = fit( [xData, yData], zData, ft, 'Normalize', 'on' );