interesting use of strread to turn a string into a cell array (though probably only really useful in cody)
Kids, don't try this at home. :-)
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
amt = 34.2;
str = '$34.20';
assert(isequal(disp_currency(amt),str))
str =
$34.20
|
2 | Pass |
%%
amt = 91337585;
str = '$91,337,585.00';
assert(isequal(disp_currency(amt),str))
str =
$91,337,585.00
|
3 | Pass |
%%
amt = -63234922.46;
str = '($63,234,922.46)';
assert(isequal(disp_currency(amt),str))
str =
($63,234,922.46)
|
4 | Pass |
%%
amt = 2784.9;
str = '$2,784.90';
assert(isequal(disp_currency(amt),str))
str =
$2,784.90
|
54223 Solvers
831 Solvers
Similar Triangles - find the height of the tree
203 Solvers
Make a random, non-repeating vector.
2795 Solvers
Set some matrix elements to zero
290 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!