This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Individual Dimensions | |
syms x1 | |
syms x2 | |
syms x3 | |
syms x4 | |
% Column Vector x | |
x = [x1,x2,x3,x4]' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [] = q10 | |
% Data Set | |
X = [0.10, 0.15, 0.20, 0.30, 0.35, 0.50, 0.75]; | |
Y = [3.00, 2.00, 1.20, 2.10, 2.00, 2.50, 2.50]; | |
% Construct Interpolatants | |
[p1] = polyfit(X,Y,6); | |
[p2] = spline(X,Y); | |
[p3] = custom(0.1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tt | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (strcmp(initialCond,"sin")==0){ | |
for ( j = 0; j < x_num; j++ ){ | |
h[j] = ampl * sin ((3.14 * freq * j ) / x_num) ; | |
} |