average data from excel sheet code
显示 更早的评论
Hi, I have an excel sheet contains three arrays and its approximately 1000 points. The first column for longitude, the second for latitude and the third one for received power from an antenna and i want to make an average just for the received power points that have the same longitude and latitude and take just the average for them, can you help me and give me a hint or the m-code that i can use to edit this sheets?
Thank you :D
回答(1 个)
Azzi Abdelmalek
2013-8-27
编辑:Azzi Abdelmalek
2013-8-27
your_array=xlsread('yourfile.xls')
%------------------------------------------------
[a,b,c]=unique(your_array(:,1:2),'rows','stable')
d=accumarray(c,your_array(:,3),[],@mean)
out=[your_array(b,1:2) d]
4 个评论
Fadi
2013-8-27
Fadi
2013-8-27
Azzi Abdelmalek
2013-8-27
Put your xls file in your default folder.
your_array=xlsread('42752_Terrain umniah_section10.xls')
[a,b,c]=unique(your_array(:,1:2),'rows','stable')
d=accumarray(c,your_array(:,3),[],@mean)
out=[your_array(b,1:2) d]
Fadi
2013-8-27
类别
在 帮助中心 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!