Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be indicated by the number 9999. If you encounter missing data, you should perform linear interpolation to the nearest accurate data points (missing data will not occur in the first or last element).
The first row is always descriptive text. So if the input cell array s is
s = { ... 'Day Temp' ' 1 -5' ' 2 19' ' 3 1' ' 4 9999' ' 5 3'};
then the output variable t is the following row vector.
t = [-5 19 1 2 3];
Here's an example of real-world data.
Cody keeps throwing the error "Error using SharedVariable1 (line 11) Assertion failed." no matter what code is submitted.
Seems the test suite always calls the function with the same cell array 'Day Temp' ' 1 1.3' ' 2 1.12' ' 3 17' ' 4 -32' ' 5 13' ' 6 4.4' ' 7 19'.
I have fixed an issue with this problem where the test suite was not visible since there was no %% for the first test suite
keeps throwing Error for me too. Even though the answers are I get are the same as the test suite.
I suggest that there should have been some cases with more than one 'run' of 9999 values in the Test Suite, just as in the "real-world data". For example: clean for an input based on [100 100 9999 9999 100 200 9999 300 500], which has two (not three) 'runs'. (Testing interpolation with nil slope, as in this example, would also have been good to include.)
the problem makes you sweat, awesome!
1
my standalone MATLAB function works just fine -- but cody complains by
"Error using SharedVariable1 (line 11)
Assertion failed."
I cannot make heads or tails of it. Any help?
Check the test suite. There was an issue with the displaying of test suite.
Sorry about all the incorrect solutions just before this, but Cody was throwing errors that my Matlab installation wasn't.
It dseon't mettar waht oedrr the lrettes in a wrod are.
494 Solvers
Find the sum of the elements in the "second" diagonal
880 Solvers
Back to basics 25 - Valid variable names
253 Solvers
208 Solvers
357 Solvers