Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
s = [];
s(1).time = 8;
s(1).temp = 20;
s(2).time = 10;
s(2).temp = 22;
oldField = 'temp';
newField = 'temperature';
sc = [];
sc(1).time = 8;
sc(1).temperature = 20;
sc(2).time = 10;
sc(2).temperature = 22;
sa = renamefield(s, oldField, newField);
assert(isequal(sc,sa))
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In renamefield (line 2)
In ScoringEngineTestPoint1 (line 16)
In solutionTest (line 3)]
|
2 | Pass |
s = [];
s(1).first = 'Walt';
s(1).last_name = 'Whitman';
s(1).score = 73;
s(2).first = 'Carl';
s(2).last_name = 'Sandburg';
s(2).score = 91;
oldField = 'first';
newField = 'first_name';
sc = [];
sc(1).first_name = 'Walt';
sc(1).last_name = 'Whitman';
sc(1).score = 73;
sc(2).first_name = 'Carl';
sc(2).last_name = 'Sandburg';
sc(2).score = 91;
sa = renamefield(s, oldField, newField);
assert(isequal(sc,sa))
[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.]
[> In unix (line 32)
In renamefield (line 2)
In ScoringEngineTestPoint2 (line 20)
In solutionTest (line 5)]
|
Find the longest sequence of 1's in a binary sequence.
3370 Solvers
The Goldbach Conjecture, Part 2
1285 Solvers
272 Solvers
Arrange vector in ascending order
624 Solvers
Find nearest prime number less than input number
268 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!