Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
fmt='%.3f';
v=[-3.1416 -1.5708 0 1.5708 3.1416];
c_exp={ '-3.142' '-1.571' '0.000' '1.571' '3.142'};
assert(isequal(vector2formattedstringCA(fmt,v),c_exp))
|
2 | Pass |
fmt='%.6f';
v=rand(1,5);
c_exp={};
for data=v
c_exp{end+1} = sprintf(fmt,data);
end
assert(isequal(vector2formattedstringCA(fmt,v),c_exp))
|
3 | Pass |
fmt='%i';
v=rand(1,10)*100;
c_exp={};
for data=v
c_exp{end+1} = sprintf(fmt,data);
end
assert(isequal(vector2formattedstringCA(fmt,v),c_exp))
|
Extract leading non-zero digit
967 Solvers
851 Solvers
Find the peak 3n+1 sequence value
792 Solvers
135 Solvers
Matrix with different incremental runs
91 Solvers