n=359;
a=[];
b=[];
c=[];
% for loop
for i=1:n  
    filename=sprintf('output_%d.dat',i);
    fileinfo = importdata(filename);
    ux=fileinfo.data(:,7);   % extract column data
    uy=fileinfo.data(:,8);
    uz=fileinfo.data(:,9);
    a=[a,ux];   % put all Ux in an array
    b=[b,uy];
    c=[c,uz];

end
aver_Ux=sum(a,2)/n;  % sum of array elements
aver_Uy=sum(b,2)/n;

aver_Uz=sum(c,2)/n;

*********
- [[https://www.mathworks.com/help/matlab/ref/sum.html?searchHighlight=sum&s_tid=doc_srchtitle][sum]]

* average vector from multiple files--Matlab的更多相关文章

  1. average column data from multiple files

    example in file a, data is [1 , 2, 3; 4,5,6] file b, data is  [4,5, 6; 7,8,9] average=0.5 (a+b) matl ...

  2. 基于Picture Library创建的图片文档库中的上传多个文件功能(upload multiple files)报错怎么解决?

    复现过程 首先,我创建了一个基于Picture Library的图片文档库,名字是 Pic Lib 创建完毕后,我点击它的Upload 下拉菜单,点击Upload Picture按钮 在弹出的对话框中 ...

  3. How to effectively work with multiple files in Vim?

    Why not use tabs (introduced in Vim 7)? You can switch between tabs with :tabn and :tabp, With :tabe ...

  4. How to Upload multiple files to documentLibrary in one time

         In a Sharepoint 2013 website,we can upload one file to the documentlibrary by click "Uploa ...

  5. Uploading multiple files asynchronously by blueimp jquery-fileupload

    Uploading multiple files asynchronously by blueimp jquery-fileupload   Solved. Fiddle: http://jsfidd ...

  6. How to attach multiple files in the Send Mail Task in SSIS

    Let’s say you need to create a SSIS package that creates 2 files and emails the files to someone. Yo ...

  7. [SCSS] Organize SCSS into Multiple Files with Partials

    Tired of dealing with monolithic CSS files? Are requests for multiple CSS files hurting your perform ...

  8. Retrofit Upload multiple files and parameters

    Retrofit 的介绍以及基本使用 这里不再说明. 关于多文件上传 以及上传文件的同时携带多个参数说明 网上涉及到的不是太多. 上一张帅图: 代码: apiService: /** params 参 ...

  9. How to read and write multiple files in Python?

    Goal: I want to write a program for this: In a folder I have =n= number of files; first read one fil ...

随机推荐

  1. C++ 值初始化和默认初始化

    对于初始化的问题,我之前一直傻傻分不清.有关初始化以及赋值的区别也是一问题,这次回过头来看,配合<<CSAPP>>的内容,对初始化有了一些新的认识. 声明: 在环境/上下文中指 ...

  2. F5 SSLVPN 的安装问题

    WIN10下安装SSLVPN问题 1.右击计算机 -->选择管理-->查看安装的插件是否显示感叹号 2.如果显示感叹号-->则进行更新驱动-->>手动选择-->网络 ...

  3. bzoj 1575: [Usaco2009 Jan]气象牛Baric【dp】

    完了不会dp了 设f[i][j]为以i结尾,有j个时的最优值,辅助数组g[i][j]为s选了i和j,i~j中的误差值 转移是f[j][i]=min(f[k][i-1]+g[k][j]) #includ ...

  4. 1.2打印ASCII码

    描述 输入一个除空格以外的可见字符(保证在函数scanf中可使用格式说明符%c读入),输出其ASCII码. 输入一个除空格以外的可见字符.输出一个十进制整数,即该字符的ASCII码.样例输入 A 样例 ...

  5. [Usaco2015 Jan]Moovie Mooving

    Description Bessie is out at the movies. Being mischievous as always, she has decided to hide from F ...

  6. .net中RSA加密解密

    1.产生密钥: private static void CreateKey() { using (RSACryptoServiceProvider rsa = new RSACryptoService ...

  7. 397 Integer Replacement 整数替换

    给定一个正整数 n,你可以做如下操作:1. 如果 n 是偶数,则用 n / 2替换 n.2. 如果 n 是奇数,则可以用 n + 1或n - 1替换 n.n 变为 1 所需的最小替换次数是多少?示例 ...

  8. CircuitBreaker design pattern---reference

    It's common for software systems to make remote calls to software running in different processes, pr ...

  9. Python(2)-第二天

    除法 >>> 8 / 5 1 >>> 8 / 5.0 1.6 >>> 8.0 / 5 1.6 >>> 8 // 5.0 1.0 ...

  10. ch1 About thinking skills

    When confronted with a problem , we think about it. The issue, of course, is that our efforts may be ...