IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
get_matlab_output.m
Go to the documentation of this file.
1 %>@ingroup codegen string
2 %>@file
3 %>@brief Returns a string containing the text that MATLAB shows when you type the variable name in the command prompt
4 
5 function s = get_matlab_output(o, flag_cell)
6 
7 if ~exist('flag_cell')
8  flag_cell = 0;
9 end;
10 
11 s = regexp(cellstr(evalc('o')), '\n', 'split');
12 s = s{1};
13 % s = w = cellfun(@(a) [a '$'], {'10', 'log(1)', '444'}, 'UniformOutput', 0);[cellfun(s(8:end-2);
14 % s = strtrim(s(8:end-2));
15 s = s(7:end-2);
16 
17 s = [[class(o), '; ', o.get_ancestry()], s];
18 
19 if ~flag_cell
20  s = sprintf('%s\n', s{:});
21  s = s(1:end-1);
22 end;
function get_matlab_output(in o, in flag_cell)