MATLAB has strict format requirement.
1. A and B are in double format. C is in cell format. (C is read by: [~,C,~] = xlsread('C:\XXX\XXX.xlsx','Sheet1','M2:X2')
A = [1015202530];B = [1423992 1356920 1356920440353 436518 4365181325369 1307792 13077921485221 1165422 11623731496009 1489431 14894316170946 5756085 5753036];C ='SECTOR' 'MKVALM' 'DVYDC' 'DVYLD500'
How can I combine A, B and C to get a matrix D so that:
D = SECTOR MKVALM DVYDC DVYLD50010 1423992 1356920 135692015 440353 436518 43651820 1325369 1307792 130779225 1485221 1165422 116237330 1496009 1489431 1489431SUM 6170946 5756085 5753036
Notice that the D(7,1) = 'SUM'.
2. Once I get D, I want to add an empty row and a row with numbers to get E,
E = SECTOR MKVALM DVYDC DVYLD50010 1423992 1356920 135692015 440353 436518 43651820 1325369 1307792 130779225 1485221 1165422 116237330 1496009 1489431 1489431SUM 6170946 5756085 575303635 12 12 14
Notice there is an empty row between 'SUM 6170946 5756085 5753036' and '35 12 12 14'.
Any help will be appreciated!
Best Answer