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!