Problem 8079. Create a fixed format text output
Given a short brief matrix, such as x = [1.2 2.4 3.6; 1.5 2.3 3.5; 1.35 2.35 3.65] and a label 13, create a fixed format text output whose contents are in a cell array as follows:
[13] '1:' [1.2] '2:' [2.4] '3:' [3.6] [13] '1:' [1.5] '2:' [2.3] '3:' [3.5] [13] '1:' [1.35] '2:' [2.35] '3:' [3.65]
That is to say, add a label before each line of x, and add a column index value before each column of x. Use the delimiter ':' to separate the index value from the column value.
Solution Stats
Problem Comments
-
2 Comments
Binbin Qi
on 10 Apr 2015
lack of ')' in test2?
Gareth Lee
on 13 Apr 2015
yes, your are right? I miss it, thank you!
Solution Comments
Show commentsProblem Recent Solvers19
Suggested Problems
-
41566 Solvers
-
Return the largest number that is adjacent to a zero
5331 Solvers
-
2915 Solvers
-
Check to see if a Sudoku Puzzle is Solved
320 Solvers
-
650 Solvers
More from this Author3
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!