How to convert double-precision array to table?

463 views (last 30 days)
João
João on 20 Apr 2014
Answered: Geoff Hayes on 16 Jan 2015
So, I have a double-precision variable and need to convert it to a table. My code is:
results = [media; assimetria; curtose; desvpad; maximo; minimo; percentil01; percentil15; percentil10; percentil90; percentil95; percentil99; percentil999];
Wich gives me the following array:
Columns 1 through 14
-0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 -0.0000 0.0000 0.0000 0.0000 -0.0000 -0.0000 -0.0000
-0.0463 0.0515 0.1202 0.1341 0.1282 0.3129 0.3202 0.3418 0.2533 0.2281 0.1427 -0.1630 -0.4501 -0.8028
2.9980 3.0935 3.4074 3.5611 3.3715 3.4364 3.2574 3.2618 3.1531 3.2661 3.1175 3.3168 3.7721 4.7322
3.6872 9.6337 13.8932 50.4063 61.6648 44.0496 71.3164 80.3508 59.9515 67.8242 54.0177 40.6748 24.5300 14.7772
15.9092 46.1723 91.2464 336.6581 337.9796 273.4195 360.6352 434.0143 292.6467 379.5966 260.4138 171.2414 131.4270 50.8001
-15.1258 -41.4160 -73.9796 -237.9702 -252.6530 -174.3896 -235.4081 -291.3487 -221.4536 -275.6370 -218.0142 -275.4814 -188.7665 -144.6202
-11.6768 -30.2624 -43.6700 -163.3954 -195.1284 -125.5992 -192.0955 -215.8416 -169.4877 -199.8475 -160.5336 -143.6591 -97.0412 -66.3292
-7.9418 -20.7491 -29.8364 -109.3983 -132.9864 -89.2982 -142.6997 -158.1282 -121.2202 -139.9218 -113.6042 -91.9430 -59.5521 -39.4647
-4.7808 -11.8918 -17.4018 -62.5183 -76.7724 -54.1517 -88.4322 -99.4865 -74.7218 -84.2592 -67.7771 -52.1967 -31.7426 -18.8941
4.7022 12.3836 17.4154 63.4234 78.1628 56.6830 93.0991 104.2898 77.8608 87.2179 69.8615 50.4682 29.7149 17.0276
6.1392 15.9921 23.1664 83.3822 103.1126 75.7977 122.7400 139.2583 102.6497 115.6477 91.1215 64.5865 36.7825 21.0189
8.4372 22.8811 34.5131 127.4773 153.6283 114.1814 184.6327 210.4949 151.9196 171.7593 133.6414 91.9024 50.6104 28.3875
11.3112 31.4103 49.1239 185.0330 220.0825 166.1303 261.5762 289.7293 206.8078 240.8887 178.2858 129.8793 69.9695 38.2122
Columns 15 through 17
0.0000 -0.0000 -0.0000
-0.6894 -0.2909 -0.0643
5.1378 4.0827 3.2452
9.0147 8.4786 7.5592
42.7505 41.6883 31.4313
-84.2767 -70.0968 -38.3420
-42.4469 -34.6677 -25.7193
-22.9161 -20.0837 -16.9686
-11.3821 -10.5392 -9.5344
10.4555 10.3823 9.5158
13.2236 13.4366 12.3811
18.9752 19.3160 17.5696
25.3727 26.3018 23.4550
I need to convert it to a table, but when I use "array2table" I got this error: Undefined function 'array2table' for input arguments of type 'double'.
Can someone help?
  2 Comments
Geoff Hayes
Geoff Hayes on 20 Apr 2014
The error message seems to indicate that the function does not exist. At the command line, type:
help array2table
Is any information on this function returned? What version of MATLAB are you using?
Ricky
Ricky on 15 Jan 2015
Hi Joao,
Where you able to solve this issue? I am working on Matlab 2013 and it yields the same error. Where can I find the scripts for this sort of functions?
Cheers
Ricky

Sign in to comment.

Answers (1)

Geoff Hayes
Geoff Hayes on 16 Jan 2015
Joao & Ricky - if you check the documentation, you will note that the function array2table appears in version R2013b. So if you are using R2013a, then you don't have access to this function. In fact, the table data structure was introduced in R2013b - see http://www.mathworks.com/help/releases/R2013b/matlab/release-notes.html for details.

Categories

Find more on Tables in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!