Hi, I have a few transfer functions and some other numbers which I want to save to table and then display in command window. Transfer functions have 3 lines and It's apears by this ↵ characters. I need to remove them and show by 3 lines in one cell. For example:
tf_1 = tf(1.002, [0.578, 1], 'IODelay', 0.5);tf_2 = tf(0.987, [0.578, 1], 'IODelay', 0.2);tf_3 = tf(0.991, [0.612, 1], 'IODelay', 0.15);tf_1_text = matlab.unittest.diagnostics.ConstraintDiagnostic.getDisplayableString(tf_1);tf_2_text = matlab.unittest.diagnostics.ConstraintDiagnostic.getDisplayableString(tf_2);tf_3_text = matlab.unittest.diagnostics.ConstraintDiagnostic.getDisplayableString(tf_3);a = [0.9991, 0.897, 0.957];b = {'a', 'b', 'c'};transfer_fun_T = table([string(tf_1_text); string(a(1)); b(1)],... [string(tf_2_text); string(a(2)); b(2)],... [string(tf_3_text); string(a(3)); b(3)],... 'VariableNames', {'Transfer fun 1', 'Transfer fun 2', 'Transfer fun 3'},... 'RowName', {'Transfer function', 'some numbers', 'some strings'});disp(transfer_fun_T);
Output of example code:
So I need a cell with multiple lines to make it readable.
Thank you for your answer
Best Answer