Azzera filtri
Azzera filtri

Group Transpose and plot

4 visualizzazioni (ultimi 30 giorni)
Maneesh
Maneesh il 14 Ott 2019
Risposto: Maneesh il 18 Ott 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

Risposte (1)

Maneesh
Maneesh il 18 Ott 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));

Categorie

Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by