Plotting column wise data from multiple sheets of Excel spreadsheet into single Scatter plot
2 ビュー (過去 30 日間)
古いコメントを表示
Hi, I have one question.Let say I have an excel workbook with 5 separate sheets in it. In each sheet i have column wise data. Now, I want to plot a single scatter plot from all of sheets having two column wise variables let say A and B .
so that i can get one single scatter plot so that i can compare different data sets from each sheet.Also I want to have a single trend line from all data sets so that it can be showed variation of data from trend line and different data sets.
Can anybody give me hint regrading this ??
dataset = xlsread('AllSource_MicArr1.xlsx','Src_1MIC_Array1','A4:T51');
x =dataset(:,10);
y = dataset(:,13);
dataset1 = xlsread('AllSource_MicArr1.xlsx','Src_2MIC_Array1','A4:T51');
a = dataset1(:,10);
b = dataset1(:,13);
dataset2 = xlsread('AllSource_MicArr1.xlsx','Src_3MICArray_1','A4:T51');
c = dataset2(:,10);
d = dataset2(:,13);
dataset3 = xlsread('AllSource_MicArr1.xlsx','Src_4MICArray_1','A4:T51');
e = dataset3(:,10);
f = dataset3(:,13);
scatter(x,y);
hold all
scatter(a,b);
grid on
scatter(c,d);
scatter(e,f);
xlim([-40 80]);
ylim([-40 60]);
xlabel('phi ground');
ylabel('phi sim');
title('Variation between phi ground and phi simulated');
legend('Phi ground and simulated');
6 件のコメント
Bob Thompson
2018 年 9 月 24 日
I think your best way to do this would be to create a separate plot with all points in a single dataset, and then generate a trend line for that new dataset.
That's just my first thought, but I admittedly don't know that much about trend lines in Matlab.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Distribution Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!