Hi,
I want to group and transpose a set of data and then crpresent is as a plot.
Please see the attached excel file Graph.xlsx.
As given in sheet1 of the file,
Range A2:C108 contain the raw data. I want to group and transpose it to as given in the range F1:P14
And finally plot the transformed data.
Please help.
Thanks

답변 (1개)

Maneesh
Maneesh 2019년 10월 18일

0 개 추천

Got it
filename = 'Graph.xlsx';
sheet1 = 'Sheet1'; %All ISINs in the portfolio
xlRange1 = 'A2:C108';
scoreData = readtable(filename,'Sheet','Sheet1','Range','A2:C108','ReadVariableNames',true);
scoreData2cell = table2cell(scoreData);
M=cell2mat(scoreData2cell(:,2:3));
[~,Header]=ismember(scoreData2cell(:,1),unique(scoreData2cell(:,1)));
K=accumarray([M(:,1),Header],M(:,2));

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

질문:

2019년 10월 14일

답변:

2019년 10월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by