Added source Matlab code for reference
This commit is contained in:
parent
b8af977117
commit
b5d99903d2
186 changed files with 61405 additions and 1 deletions
15
matlab/graph/double2labels.m
Normal file
15
matlab/graph/double2labels.m
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
function labels = double2labels(B)
|
||||
% DOUBLE2LABELS Transforms a double matrix into a cell array of strings.
|
||||
|
||||
[n m] = size(B);
|
||||
labels = cell(n, m);
|
||||
|
||||
for i = 1:n
|
||||
for j = 1:m
|
||||
if B(i, j) == 0
|
||||
labels{i, j} = '';
|
||||
else
|
||||
labels{i, j} = sprintf('%.2g', B(i, j));
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue