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 |
x = 1123421;
y_correct = 3;
assert(isequal(your_fcn_name(x),y_correct))
a =
'1123421'
b =
1×7 logical array
1 1 0 0 0 0 1
ans =
3
|
2 | Pass |
x = 1111;
y_correct = 4;
assert(isequal(your_fcn_name(x),y_correct))
a =
'1111'
b =
1×4 logical array
1 1 1 1
ans =
4
|
3 | Pass |
x = 345450;
y_correct = 0;
assert(isequal(your_fcn_name(x),y_correct))
a =
'345450'
b =
1×6 logical array
0 0 0 0 0 0
ans =
0
|
651 Solvers
147 Solvers
Create matrix of replicated elements
321 Solvers
259 Solvers
1159 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!