Clear Filters
Clear Filters

I did not find a solution in google, but I did it !!! What do you think ? Are there any others solutions for the spaces between columns in arrays ?

1 view (last 30 days)
n=size(A); % size(A)=70 60
B=[];
C=reshape(blanks(n(1)*10),n(1),10);
d=[5 35 24 19 7];
for i=d
B=horzcat(B,num2str(A(:,i)),num2str(C));
end
disp(B)
  6 Comments
César Hernández
César Hernández on 5 Mar 2018
Hi Walter! My goal is to be able to select some of the columns from an array and display them with a specific format. For example, I would like to add a title to each column that I choose and separate those columns enough so that their titles fit; having the decimal points aligned would also be good. So, please let me know whether Matlab itself already has a function that I could use to do this more easily. Thank you for your help!

Sign in to comment.

Accepted Answer

César Hernández
César Hernández on 5 Mar 2018
Well, I'm not a supporter of tables, only when I do exams. But please tell me how to format a table with several titles and columns, such as: Column 26 Column 43 Column 7. And below the row of titles, the values or the columns' numbers n * 1. It is because, for me, it's a bit difficult to understand, in the 'table help'. Thanks for your help. REGARDS

More Answers (0)

Community Treasure Hunt

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

Start Hunting!