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. uva1560

    In an extended version of the game Lights Out®, is a puzzle with 5 rows of 6 buttons each (the actua ...

  2. STM32:片上Flash 操作

    之前IAP时候记录过一些,今天对特定地方写又加深了印象,写与擦除都需要先unclock //读取指定地址的半字(16位数据) //faddr:读地址(此地址必须为2的倍数!!) //返回值:对应数据. ...

  3. 什么是javascript闭包?

    在我们开发中,也经常使用到闭包,但当有人问什么是闭包,就会可能说不上来.那就谈谈一些基本的: 一.理解闭包的概念, 简单说当function里嵌套function时,内部的function可以访问外部 ...

  4. oracle给用户授权

    1.在PLSQL里,用sys(oracle系统用户)登陆,登陆的时候一定要选择SYSDBA.普通用户登陆选择normal就可以了 2.创建用户 *也可以给普通用户授权为dba即数据库管理员.在导入导出 ...

  5. bzoj 1616: [Usaco2008 Mar]Cow Travelling游荡的奶牛【dp】

    写了个bfs发现MLE了... 设f[t][i][j]为在t时刻走到(i,j)的方案数,转移和bfs一样 #include<iostream> #include<cstdio> ...

  6. 模拟 URAL 1149 Sinus Dances

    题目传送门 /* 模拟:找到规律分别输出就可以了,简单但是蛮有意思的 */ #include <cstdio> #include <algorithm> #include &l ...

  7. zepto中给不存在的元素设置样式并绑定事件的坑

    在移动端使用zepto选择器时,一般如果元素不存在会返回一个空的zepto对象. zepto在设置元素样式时,提供了两个入参方式,一种键值对方式$(".ter").css({&qu ...

  8. Visual Studio Code -VS Code

    VS Code 免费开源的编辑器,支持 windows. mac. Linux. 微软出品 官网:https://code.visualstudio.com/ 下载地址:https://code.vi ...

  9. [ POI 2012 ] Letters

    \(\\\) \(Description\) 给出两个长度为 \(N\) 的字符串\(S_1,S_2\),且保证两个字符串中每一个字符出现次数相同. 现在一次操作可以交换相邻的两个字符,问将 \(S_ ...

  10. 设置打印机共享,适用Win7、Vista、xp,不用密码

    此处以HP M1213nf为例,其他型号大同小异. 1.设置打印机共享: "开始"→  "控制面板"→  "设备和打印机" 2.找到&quo ...