How to fix the error: data must contain only individual strings or scalar values?

1 view (last 30 days)
Hi,
I have a problem with my output. My function gives me the following out put: [out1,qc1,teststat,pval]. Where teststat and pval are single numbers. Out1 and qc1 gives me as output [0,856981550219655;0,821247396820271]and [0;0], respectively.
I would like to export my results to excel, but if I use: xlswrite(filename,A,sheet,xlRange),
it does only export the values for teststat and pval. Same applies to my attempt to display the outputs in a table. Then I receive following error: ??? Error using ==> displaytable at 353 each cell in cell array ddata must contain only individual strings or scalar values.
How can I adjust out1 and qc1 to be able to export the data to Excel.
Your help is appreciated.
Thanks, Julia

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 10 Jul 2013
A=[[out1; qc1] teststat pval]
  1 Comment
Julia
Julia on 10 Jul 2013
Thanks, but unfortunately it gives me now this error:??? Error using ==> horzcat CAT arguments dimensions are not consistent.
Error in ==> ReadData at 37 A = [[out1; qc1] teststat pval];
If I change the parentheses to A = {[out1; qc1] teststat pval}. It does again only displays teststat and pval in Excel.
:(

Sign in to comment.

Categories

Find more on Tables in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!