Filter löschen
Filter löschen

Group Transpose and plot

4 Ansichten (letzte 30 Tage)
Maneesh
Maneesh am 14 Okt. 2019
Beantwortet: Maneesh am 18 Okt. 2019
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

Antworten (1)

Maneesh
Maneesh am 18 Okt. 2019
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));

Kategorien

Mehr zu 2-D and 3-D Plots finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by