科学网

 找回密码
  注册
Matlab:字符串是否相等
刘洋洋 2017-9-20 20:05
pos=find(strcmp(ID_samp(:,2),'PS99#100')==1);
个人分类: Matlab|3869 次阅读|没有评论
Matlab: 批量注释
刘洋洋 2017-7-13 04:19
%{ 代码块 %}
个人分类: Matlab|3636 次阅读|没有评论
Matlab:创建NaN矩阵
刘洋洋 2017-6-27 03:19
例:欲创建一个3X4的NaN矩阵 nMat = zeros(3,4) * nan nMat = NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN
个人分类: Matlab|16908 次阅读|没有评论
Matlab: 在ollie上激活license
刘洋洋 2017-3-28 18:01
1. 找到Host ID. 对于ollie1: 1) ifconfig 2) 最先出现的那个名字,如eth0,ether后面的码即为Host ID,如a4:bf:01:..:.. 对于专有的nod,如prod-308:1)进入prod-308. salloc --nodelist prod-0308 -pmatlab ...
个人分类: Matlab|2296 次阅读|没有评论
Matlab:跳过文件的前几行
刘洋洋 2017-1-20 23:17
fid=fopen('acs213.dev','r'); %skip first 10 lines for i=1:10 line=fgetl(fid); end fclose(fid); --------------------------------------------------------------------------------------------------- acs213.dev: % 变量line为 char型 , 内 ...
个人分类: Matlab|8293 次阅读|没有评论
Matlab: date&time 日期与时间信息提取与转换
刘洋洋 2017-1-20 21:31
描述: 现有文件acs_05_230715_1811.dat,第1行包含日期与时间信息,内部结构如下: 问题: 将日期与时间提取出来,保存成变量,并进行类型转换。 脚本: ------------------------------------------------------------------------------------------------------------ 脚本1 fid=fopen( ...
个人分类: Matlab|13740 次阅读|没有评论
Matlab:选择性提取文件中的几列
刘洋洋 2017-1-20 20:30
描述: 现有文件acs213.dev,内部结构如下: 目标: 提取11-31行的第一列和第二列中的数据部分(即上图红框中的数字部分),将其分别保存成变量wlc和wla。 脚本: ---------------------------------------------------------------------------------------------------- fid=fopen('acs213.dev& ...
个人分类: Matlab|4631 次阅读|没有评论
Matlab: 删除矩阵中含有nan的行列
刘洋洋 2017-1-9 04:57
A= ; pos = find( isnan(A) ); A(pos)= [] A = 1 2 3 2
个人分类: Matlab|6527 次阅读|没有评论
Matlab: access data in cell array
刘洋洋 2017-1-6 19:05
There are two ways to refer to the elements of a cell array: Enclose indices in smooth parentheses, () , to refer to sets of cells —for example, to define a subset of the array; Enclose indices in curly braces, {} , to refer to the text, numbers, or other data within individual cells . ...
个人分类: Matlab|2121 次阅读|没有评论

本页有 1 篇博文因作者的隐私设置或未通过审核而隐藏

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-28 00:11

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部