This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
n = ceil(100*rand());
v = rand(1,n);
v_correct = v';
assert(isequal(question(v),v_correct));
myAns =
0.6856
0.5281
0.8862
0.7543
0.3619
0.1828
0.6719
0.7273
0.7787
0.7820
0.3654
0.4249
0.4262
0.4494
0.0873
0.4251
0.3375
0.5999
0.5552
0.8847
0.0309
0.8109
0.0534
0.1708
0.1908
0.3205
0.9834
0.0915
0.5935
0.5116
0.6964
0.5541
0.5719
0.0085
0.7611
0.1419
0.4760
0.4465
0.5279
0.2879
0.5584
0.9389
0.0269
0.1524
0.6340
0.6339
0.9901
0.6841
0.8215
0.6577
0.9914
0.8306
0.9955
0.9895
0.8439
0.2534
0.5890
0.4374
0.8139
0.1836
0.2119
0.2493
0.3712
0.6713
0.9958
0.0433
0.7558
0.8034
0.7829
0.7752
0.6730
0.8070
0.8477
0.8524
0.0530
0.3211
0.9397
0.5197
0.2261
|
2 | Pass |
fid = fopen('question.m');
line1=fgetl(fid);
line2=fgetl(fid);
line3=fgetl(fid);
fclose(fid);
assert(strcmp('function myAns = question(v)',line1),'Only change the lines you are asked to');
assert(strcmp(' %%%%%',line2),'Only change the lines you are asked to');
assert(strcmp(' %%%%% Place your code below. DO NOT change anything outside the region %%%%',line3),'Only change the lines you are asked to');
|
Read a column of numbers and interpolate missing data
1235 Solvers
1900 Solvers
Project Euler: Problem 1, Multiples of 3 and 5
1491 Solvers
401 Solvers
511 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!