Clear Filters
Clear Filters


This question is closed. Reopen it to edit or answer.

Passing variable sized arguments to a method

1 view (last 30 days)
Sepp on 23 Oct 2017
Closed: MATLAB Answer Bot on 20 Aug 2021
I'm using the PrintTable method of the matlabtools . In the documentation the following example is given:
t = PrintTable('LaTeX/PDF export demo, %s',datestr(now));
t.HasRowHeader = true;
t.HasHeader = true;
Let's say I have the header names in a cell array `header = {'A','B','C'}`. Unfortunately a cell array cannot be passed to `addRow`, i.e. `t.addRow(header);` does not work. Unfortunately the size of the header varies in my case, that's why I'm storing it in a cell array.
How can I call the `addRow` method with a variable sized cell array?

Answers (1)

Jan on 24 Oct 2017
Edited: Jan on 24 Oct 2017
I do not know this toolbox and installing it just to answer this question might be inefficient. Do I understand correctly, that
works, but you have a cell array as input? Then this creates the comma separated list with a variable size of elements:
header = {'A','B','C'}

This question is closed.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!