Effacer les filtres
Effacer les filtres

Group Transpose and plot

4 vues (au cours des 30 derniers jours)
Maneesh
Maneesh le 14 Oct 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

Réponses (1)

Maneesh
Maneesh le 18 Oct 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));

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by