Chinaunix首页 | 论坛 | 博客
  • 博客访问: 392361
  • 博文数量: 103
  • 博客积分: 3073
  • 博客等级: 中校
  • 技术积分: 1078
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-23 15:04
文章分类

全部博文(103)

文章存档

2012年(13)

2011年(76)

2010年(14)

分类: WINDOWS

2011-07-28 20:12:21

Rembering the day when I am a freshman ......


字符串数组。
>>  a=['hello'; 'world'] ;
>> a(1)

ans =

h

>> a(1,:)

ans =

hello


2.链接字符串
combinedStr = strcat(s1, s2, ..., sN)
 horizontally concatenates strings in arrays s1, s2, ..., sN. Inputs can be combinations of single strings, strings in scalar cells, character arrays with the same number of rows, and same-sized cell arrays of strings. If any input is a cell array, combinedStr is a cell array of strings. Otherwise, combinedStr is a character array.

3. 得到矩阵的某一行
A(1,:)
莫一列 A(:,1)

4 if


%%%%%%%%%%%%%%%%%%%%%%
 clear all;
 
y=[];
versions=['1.1';'1.2';'1.3';'2.1';'2.2';'2.3'];
fprefix='nehalem_';
fsuffix='_time';
for i=1:5
file=strcat(fprefix,versions(i,:),fsuffix);
file;
fid=fopen(file,'r');
ytmp=fscanf(fid,'%f',inf);
%y(:,i)=ytmp

%rate=y(:,1)./ytmp;  %the first column
%y=[y rate];
if i>1
  y(:,i)=y(:,1)./ytmp;
else
    y(:,i)=ytmp;
end
size(ytmp);
fclose(fid);
end

for i=1:41
    y(i,1)=1;
end
size(y)
bar(y);



wuwu....




阅读(833) | 评论(0) | 转发(0) |
0

上一篇:linkers and loaders

下一篇:linkers and loaders 2

给主人留下些什么吧!~~