I'm having my first go trying to write a report using MATLAB Live Editor rather than using R since I found out about a package called gramm which in my opinion does a more aesthetically pleasing job plotting than default matlab.
In R you can an .RMD file which would allow me to do what I'd like to have. In short I either want 1) The headings and text to show up in the "live view" on the right or less preferably 2) Be able to fold the code as you would in a normal script so I don't have to look at 100s of lines of code when its not in use.
I've photoshopped some quick figures to better showcase my question. The first figure is the current look
This image is what I'd like to have (image is photoshopped)
inputTable = array2table(rand(50,8));
sz = size(inputTable);
n_row = sz(1);
n_var = sz(2);
inputData = table2array(inputTable);
inputColumn = inputData(:)';
variableNames = inputTable.Properties.VariableNames;
variableColumn = repelem(variableNames,n_row)';
xColumn = repmat(1:n_row,1,n_var)';
f = figure('Position',[100 100 800 400]);
g = gramm('x',xColumn,'y',inputColumn,'color',variableColumn);