Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = [ 1.0000 1.5000 2.0000 2.5000 3.0000 3.5000 4.0000 4.5000];
y=[ 0.8415 0.9975 0.9093 0.5985 0.1411 -0.3508 -0.7568 -0.9775];
xx=[1.0000 1.2000 1.4000 1.6000 1.8000 2.0000 2.2000 2.4000 2.6000 2.8000 3.0000 3.2000 3.4000 3.6000 3.8000 4.0000 4.2000 4.4000 4.6000 4.8000 5.0000]
y_correct = [0.8415 0.9338 0.9861 0.9991 0.9733 0.9093 0.8085 0.6755 0.5155 18 0.3349 0.1411 -0.0584 -0.2556 -0.4423 -0.6114 -0.7568 -0.8726 -0.9527 -0.9912 -0.9820 0.9193]
y=SpRes(x,y,xx)
assert(abs(y(1)-y_correct(1))<10^(-4))
assert(abs(y(5)-y_correct(5))<10^(-4))
assert(abs(y(8)-y_correct(8))<10^(-4))
xx =
Columns 1 through 9
1.0000 1.2000 1.4000 1.6000 1.8000 2.0000 2.2000 2.4000 2.6000
Columns 10 through 18
2.8000 3.0000 3.2000 3.4000 3.6000 3.8000 4.0000 4.2000 4.4000
Columns 19 through 21
4.6000 4.8000 5.0000
y_correct =
Columns 1 through 9
0.8415 0.9338 0.9861 0.9991 0.9733 0.9093 0.8085 0.6755 0.5155
Columns 10 through 18
18.0000 0.3349 0.1411 -0.0584 -0.2556 -0.4423 -0.6114 -0.7568 -0.8726
Columns 19 through 22
-0.9527 -0.9912 -0.9820 0.9193
y =
Columns 1 through 9
0.8415 0.9338 0.9861 0.9991 0.9733 0.9093 0.8085 0.6755 0.5155
Columns 10 through 18
0.3349 0.1411 -0.0584 -0.2556 -0.4423 -0.6114 -0.7568 -0.8726 -0.9527
Columns 19 through 21
-0.9912 -0.9820 -0.9193
|
2 | Pass |
x = [ 1.0000 1.5000 2.0000 2.5000 3.0000 3.5000 4.0000 4.5000];
y=[ 0.8415 0.9975 0.9093 0.5985 0.1411 -0.3508 -0.7568 -0.9775];
xx=[1.0000 1.4000 1.8000 2.2000 2.6000 3.0000 3.4000 3.8000 4.2000 4.6000 5.0000]
y_correct = [0.8415 0.9861 0.9733 0.8085 0.5155 0.1411 -0.2555 -0.6119 -0.8710 -0.9943 -0.9589]
y=SpRes(x,y,xx)
s=size(y)
for i=1:s(2)
assert(abs(y(1)-y_correct(1))<10^(-4))
end
xx =
Columns 1 through 9
1.0000 1.4000 1.8000 2.2000 2.6000 3.0000 3.4000 3.8000 4.2000
Columns 10 through 11
4.6000 5.0000
y_correct =
Columns 1 through 9
0.8415 0.9861 0.9733 0.8085 0.5155 0.1411 -0.2555 -0.6119 -0.8710
Columns 10 through 11
-0.9943 -0.9589
y =
Columns 1 through 9
0.8415 0.9861 0.9733 0.8085 0.5155 0.1411 -0.2556 -0.6114 -0.8726
Columns 10 through 11
-0.9912 -0.9193
s =
1 11
|
1261 Solvers
Number of 1s in the Binary Representation of a Number
356 Solvers
926 Solvers
Matlab Basics - Logical Tests I
192 Solvers
Opposite task convert string hexadecimal numbers array into array of decimal numbers .
37 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!