Matlab矩阵处理小结(2)-读数据求均值和中位数 绘制errorbar图
来源:互联网 发布:pl sql developer mac 编辑:程序博客网 时间:2024/05/16 13:54
files = dir('*.log');
for i=1:length(files)
File =files(i).name;
a=importdata(File);
b=reshape(a,6,12)';%calculate tramsportation to make std calculation easy
kth(:,:,i)=b;
end
for i=1:24
mymean=mean(kth(:,:,i));
mystd=std(kth(:,:,i));
mymedian=median(kth(:,:,i));
% myresult(:,:,1)=cat(2,myresult(:,:,1),mymean)
% myresult(:,:,2)=cat(2,myresult(:,:,2),mystd)
% a=cat(2,a,mymean);
% b=cat(2,b,mystd);
y(i,:)=mymean;
e(i,:)=mystd;
m(i,:)=mymedian;
end
y
e
m
fid=fopen('v1mean.txt','wt');
fprintf(fid,'%g\n',y);
fclose(fid);
fid1=fopen('v1mid.txt','wt');
fprintf(fid1,'%g\n',m);
fclose(fid1);
x=[1:1:24];
for i=1:6
subplot(2,3,i)
% figure('hello')
% text('Message transformation of Node v1')
% scatter(x,m(:,i),10,'Red');
plot(x,m(:,i),'RED')
hold on
errorbar(x,y(:,i),e(:,i));
% errorbar(x,y(:,i),1)
%title('type"i"')
xlabel('time');
ylabel('message');
switch i
case 1
title('type1')
case 2
title('type2')
case 3
title('type3')
case 4
title('type4')
case 5
title('type5')
case 6
title('type6')
end
end
for i=1:length(files)
File =files(i).name;
a=importdata(File);
b=reshape(a,6,12)';%calculate tramsportation to make std calculation easy
kth(:,:,i)=b;
end
for i=1:24
mymean=mean(kth(:,:,i));
mystd=std(kth(:,:,i));
mymedian=median(kth(:,:,i));
% myresult(:,:,1)=cat(2,myresult(:,:,1),mymean)
% myresult(:,:,2)=cat(2,myresult(:,:,2),mystd)
% a=cat(2,a,mymean);
% b=cat(2,b,mystd);
y(i,:)=mymean;
e(i,:)=mystd;
m(i,:)=mymedian;
end
y
e
m
fid=fopen('v1mean.txt','wt');
fprintf(fid,'%g\n',y);
fclose(fid);
fid1=fopen('v1mid.txt','wt');
fprintf(fid1,'%g\n',m);
fclose(fid1);
x=[1:1:24];
for i=1:6
subplot(2,3,i)
% figure('hello')
% text('Message transformation of Node v1')
% scatter(x,m(:,i),10,'Red');
plot(x,m(:,i),'RED')
hold on
errorbar(x,y(:,i),e(:,i));
% errorbar(x,y(:,i),1)
%title('type"i"')
xlabel('time');
ylabel('message');
switch i
case 1
title('type1')
case 2
title('type2')
case 3
title('type3')
case 4
title('type4')
case 5
title('type5')
case 6
title('type6')
end
end
0 0
- Matlab矩阵处理小结(2)-读数据求均值和中位数 绘制errorbar图
- Matlab 矩阵处理小结(3)-将多个errorbar图像绘制到一个图像上
- Matlab绘制误差棒图----errorbar函数的使用
- matlab 矩阵元素求和、求均值(期望)和均方差
- matlab 矩阵元素求和、求均值(期望)和均方差
- matlab中errorbar和shadedErrorBar
- matlab中绘制带有errorbar误差标的曲线和直方图的方法
- 中位数和均值
- Matlab求方差,均值
- matlab提升(1):用matlab求图像的均值和方差
- 均值,中位数,正态分布和Kmeans
- MATLAB 读数据操作
- matlab 均值 和sigma,求 price 和概率
- matlab中semilogx画图和显示errorbar ‘工’字型误差
- MATLAB均值和标准差
- 中位数、众数和均值的关系
- Matlab -----求矩阵特征多项式和特征值
- matlab求矩阵特征值和特征向量、行列式
- 不同相关性度量方法的线上效果对比与分析
- 面向对象
- ios开发答疑录系列---ios编译正常,但无法运行到真机和模拟器上 ,Choose a destination with a supported architecture
- 最小化类及其成员的可访问性
- assertThat用法
- Matlab矩阵处理小结(2)-读数据求均值和中位数 绘制errorbar图
- HTTP 并不是一种传输协议
- ios 应用中直接跳转到指定app页面 或者 app 评价页面 的方法
- [Clojure] A Room-Escape game, playing with telnet and pure-text commands - Part 1
- 关于Cocos2d 开发中有关精灵、精灵帧、精灵帧缓存、精灵表单以及plist文件之间的关系
- 编写RESTful Web服务的文档
- SQLServer 全文检索(full-text)语法
- Matlab 矩阵处理小结(3)-将多个errorbar图像绘制到一个图像上
- 版本化RESTful Web服务