自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

#+!

  • 博客(56)
  • 资源 (1)
  • 收藏
  • 关注

转载 PCB units conversion

the PCB editor is preferably set to mil = 1/1000 inch, while the boardhouse calculates with micrometers and millimeters. 1000 mil = 25.4 mm 50 mil = 1.28mm 40 mil approx 1.00 mm 10 mil

2012-02-21 20:04:30 837

转载 dir 列出当前文件夹文件 matlab

dir - List folder contentsSyntaxdirdir namelisting = dir(name)Descriptiondir lists the files andfolders in the MATLAB current folder. Results appear in the orderreturned by the opera

2012-02-18 17:50:55 3412

原创 edit box callback 函数控制 字符输入 matlab

function [] = GUI_21()% Demonstrate how to get selection from a popup to an edit box & vis versa. % This is an expansion of GUI_20.  Here we will enforce a specific list of % choices so that any

2012-02-18 17:43:30 1552

原创 工作空间保留指定变量 clearvars matlab

clearvars 可以清除内存中的某些或全部变量,也可以保留指定的变量.%清除工作空间中除变量b以外的所有其他变量clearvars -except b

2012-02-17 16:36:50 7190 2

原创 buttondownfcn 用法 matlab

function [] = GUI_18()% Demonstrate the use of the buttondownfcn for an axes.  % Clicking on the axes creates a random line.  Note that clicking on the % line does the same thing.  This must be

2012-02-17 16:02:58 6816

转载 一个多句柄间简化回调函数的例子 matlab

function [] = GUI_16()% Demonstrate display & change a slider's position & limits with edit boxes  % This is an extension of GUI_13. Slide the slider and it's position will % be shown in the edi

2012-02-17 15:46:34 1130

转载 matlab GUI 参数传递

1。运用gui本身的varain{}、varaout{}传递参数(注:这种方式仅适用与gui间传递数据,且只适合与主子结构,及从主gui调用子gui,然后关掉子gui,而不适合递进结构,即一步一步实现的方式)           输入参数传递:比如子GUI的名称为subGUI,设想的参数输入输出为:[out1,out2] = subGUI(in1, in2)在subGUI的m文

2012-02-16 16:28:25 2384 4

原创 Unix 处理当前目录下文件

#!/bin/bashfor file in $(ls)do echo "file:$i"donefor file in $(*)do echo "file: $i"done

2012-02-16 14:56:19 469

原创 Unix 处理多个输入文件

t.sh a.hv b.hv ...for variabledo commandcommand...donefor variable in "$@"docommand command...done

2012-02-16 14:53:28 435

原创 sed一次性插入多行

[root@ ~]# sed "2 a\ asdsdasdasdadsasda\nsdasdasdsdasdasda " test#!/bin/bashtestIFS=$IFS asdsdasdasdadsasdasdasdasdsdasdasda aa=#aa:bb:ccif `expr $aa : '^[#]' > /dev/null`then    echo

2012-02-16 13:09:03 10347

原创 Unix shell和awk 变量交互

awk中使用shell的环境变量一:"'$var'"这种写法大家无需改变用'括起awk程序的习惯,是老外常用的写法.如:var="test"awk 'BEGIN{print "'$var'"}'这种写法其实际是双括号变为单括号的常量,传递给了awk.如果var中含空格,为了shell不把空格作为分格符,便应该如下使用:var="this is a test"awk

2012-02-15 17:30:39 1558

原创 Unix awk 替换域

awk -F: 'BEGIN{OFS=":"}/Mike Harrington/{$1="xx xxxx";print}' urfile

2012-02-15 17:28:47 1033

转载 sed 编辑后保存到源文件

我想用sed删除同时符合$KEYWORD1和$KEYWORD2条件的行,删除后保存至原来文件。sed "/$KEYWORD1.*.$KEYWORD2/d" $TAIZHANG上面那条命令已经能够剔除同时符合$KEYWORD1和$KEYWORD2的行,但是没法保存至原文件。用:sed "/$KEYWORD1.*.$KEYWORD2/d" $TAIZHANG  > $TAIZH

2012-02-14 21:03:36 6326

转载 unix 双引号与单引号在awk sed使用

" "(雙引號) 與 ' '(單引號)差在哪? 還是回到我們的 command line 來吧...經過前面兩章的學習,應該很清楚當你在 shell prompt 後面敲打鍵盤、直到按下 Enter 的時候,你輸入的文字就是 command line 了,然後 shell 才會以行程的方式執行你所交給它的命令。但是,你又可知道:你在 command line 輸入的每一個文字,

2012-02-14 18:24:12 2077

转载 unix tar gzip压缩解压

tar命令tar 文件是几个文件和(或)目录在一个文件中的集合。这是创建备份和归档的佳径。tar 使用的选项有:-c   创建一个新归档。-f   当与 -c 选项一起使用时,创建的 tar 文件使用该选项指定的文件名;当与"-x"选项一起使用时,则解除该选项指定的归档。-t   显示包括在 tar 文件中的文件列表。-v   显示文件的归档进度。-x   从归档中抽取

2012-02-13 17:39:20 5519

转载 matlab 转义字符

转义字符英文叫做escape characters,应该译作"被遗忘的字符"或者"逃跑的字符" 多好啊。干嘛搞的那么学术??如果你要定义一个字符串,可是字符串里面有个单引号,可能就会遇到困难。比如我定义s='这个句子中有一个单引号',怎么吧'    %matlab会报错复制代码第一个单引号和第二个单引号配成一对。得不到我们的结果。你要这样:

2012-02-10 14:36:26 27936

转载 matlab中如何保存数据到指定文件夹中?

save(['E:\Study\', filename], 'data')

2012-02-09 12:25:22 46582 2

转载 cat matlab 以特定维链接矩阵

cat - Concatenate arrays along specified dimensionSyntaxC = cat(dim, A, B)C = cat(dim, A1, A2, A3, A4, ...)DescriptionC = cat(dim, A, B)concatenatesthe arrays A and B along arraydi

2012-02-09 11:35:03 1752

原创 matlab repmat 重复数据

B = repmat(A,m,n)B = repmat(A,[m n])B = repmat(A,[m n p...])这是一个处理大矩阵且内容有重复时使用,其功能是以A的内容堆叠在(MxN)的矩阵B中,B矩阵的大小由MxN及A矩阵的内容决定,如果A是一个3x4x5的矩阵,有B = repmat(A,2,3)则最后的矩阵是6x12x5例如:>>B=repmat( [1 2;3

2012-02-08 18:14:30 3069

转载 date and time information matlab

Date and Time FunctionsThis table shows what information is available in MATLAB withrespect to dates and times and which function provides this information.The sections that follow the table provide

2012-02-07 18:04:09 859

转载 Timer 用法 matlab

创建定时器对象:语法:  T = timer[创建一个默认状态的定时器对象]T = timer('PropertyName1', PropertyValue1, 'PropertyName2', P  ropertyValue2,...)[创建一个拥有给定参数的定时器对象]例子:        t = timer('TimerFcn',@mycallback, 'Pe

2012-02-07 17:56:55 12251

转载 MATLAB实际单位时间计时函数

MATLAB实际单位时间计时函数的具体应用,在编写程序时,经常需要获知代码的执行实际时间,这就需要在程序中用到计时函数,matlab中提供了以下三种方法:1.cputime(单位不明)返回matlab启动以来的CPU时间,可以在程序执行钱保存当时的CPU时间,然后在程序执行结束后用cputime减去运行前保存的数值,就可以获取程序的实际运行时间>>t0=cputime;pa

2012-02-07 17:25:08 9471

转载 matlab sprintf 数字转成字符串

sprintfFormat data into stringSyntaxstr = sprintf(format, A, ...)[str, errmsg] = sprintf(format, A, ...)Descriptionstr = sprintf(format, A, ...) applies the format to all e

2012-02-06 19:15:14 12595

转载 Unix kill 终止进程

学习Linux进程时,大家可能会遇到同样的问题,这里简单概括了Linux进程kill命令以及Linux控制多个命令的方法,经过总结,在这里拿出来和大家分享一下,希望对大家有所帮助.......Linux kill命令当需要中断一个前台进程的时候,通常是使用组合键;但是对于一个后台进程恐怕就不是一个组合键所能解决的了,这时就必须求助于kill命令。该命令可以终止后台进程。至于终止后台进程的原

2012-02-06 12:07:08 9561

转载 Unix ps 查看进程

ps命令  要对进程进行监测和控制,首先必须要了解当前进程的情况,也就是需要查看当前进程,而ps命令就是最基本同时也是非常强大的进程查看命令.使用该命令可以确定有哪些进程正在运行和运行的状态、进程是否结束、进程有没有僵尸、哪些进程占用了过多的资源等等.总之大部分信息都是可以通过执行该命令得到的.  ps命令最常用的还是用于监控后台进程的工作情况,因为后台进程是不和屏幕键盘这些标准输入/

2012-02-06 12:01:01 6874

转载 linux 更改shell

1.查看当前使用的shell类型# echo $SHELL/usr/bin/bsh2.改变test用户登陆的默认shell$ chsh test /usr/bin/ksh重新登陆后生效或者使用root用户直接修改/etc/passwd文件将test:!:1002:1001::/home/test:/usr/bin/bsh修改为test:!:1002:10

2012-02-06 11:42:01 3597

转载 Unix head tail 显示头尾几行

head命令● 默认 选项不指定任何选项的时候,比如执行head f.java,则显示f.java文件的全部内容。● -n 选项显示指定文件的前n行,n为一个整数。■ tail命令● 默认 选项不指定任何选项的时候,比如执行tail f.java,则显示f.java文件的全部内容。● -n 选项显示指定文件的后n行,n为一个整数。--------------

2012-02-04 16:58:34 3854

转载 Unix script 17 - examples

Just a quick exercise I think might be useful in working out how good you are at shell scripting...Address BookDirectory TraversalAddressbookOkay, it's boring, but here's your exercise for t

2012-02-04 16:42:21 504

转载 Unix script 16 - interactive shell

Here are a few quick hints for using the UNIX or Linux shell interactively. Personally Irecommend the bash shell for most interactive use; it is available on justabout every *nix flavour, and very ple

2012-02-04 16:41:39 485

转载 Unix script 15 - quick reference

This is a quick reference guide to the meaning of some of the less easilyguessed commands and codes.CommandDescriptionExample&Run the previous command in the backgroundls &

2012-02-04 16:40:50 303

转载 Unix script - 14 hints and tips

Unix is full of text manipulating utilities, some of the more powerfulof which we will now discuss in this section of this tutorial. The significance of this, is that virtually everything under Unix

2012-02-04 16:35:07 645

转载 Unix tr 替换删除字符

1、关于tr   通过使用 tr,您可以非常容易地实现 sed 的许多最基本功能。您可以将 tr 看作为 sed 的(极其)简化的变体:它可以用一个字符来替换另一个字符,或者可以完全除去一些字符。您也可以用它来除去重复字符。这就是所有 tr 所能够做的。       tr用来从标准输入中通过替换或删除操作进行字符转换。tr主要用于删除文件中控制字符或进行字符转换。使用tr时要转换两个字

2012-02-04 16:26:11 4835 1

转载 Unix basename 去掉文件后缀

About basenameThe basename utility deletes any prefix ending in / and the suffix (if present in string) from string, and prints theresult on the standard output. It is normally used inside substit

2012-02-04 16:05:51 1305

转载 使用shift对不定长的参数进行处理

#测试shift命令(x_shift.sh)    until [ $# -eq 0 ]    do         echo "第一个参数为: $1 参数个数为: $#"         shift    done执行以上程序x_shift.sh:    $./x_shift.sh 1 2 3 4结果显示如下:    第一个参数为: 1 参数个数为:

2012-02-03 17:45:35 628

转载 Unix shell 保留字符

BASH 中有一些保留变量,下面列出了一些:$IFS  这个变量中保存了用于分割输入参数的分割字符,默认识空格。 $HOME  这个变量中存储了当前用户的根目录路径。 $PATH  这个变量中存储了当前 Shell 的默认路径字符串。 $PS1  表示第一个系统提示符。 $PS2  表示的二个系统提示符。 $PWD  表示当前工作路径。 $EDITOR 表示系统的默

2012-02-03 17:43:40 844

转载 Unix shell -x 跟踪模式

-x 进入跟踪方式,显示所执行的每一条命令,用于调度

2012-02-03 17:41:30 397

转载 Unix script 12 - extrnal programs 外部程序

External programs are often used within shell scripts; there are a fewbuiltin commands (echo,which, andtestare commonly builtin), but many useful commands are actually Unix utilities,such astr,gre

2012-02-03 17:03:43 342

转载 Linux cut 显示文本信息

有时我们经常会遇到这样一些问题:有一页电话号码薄,上面按顺序规则地写着人名、家庭住址、电话、备注等,此时我们只想取出所有人的名字和其对应的电话号码,你有几种方法可以实现呢?以下内容欢迎转载,但请保留作者名号及出处,谢谢!原创:frozen_sucker链接:http://blog.csdn.net/Frozen_fish/archive/2008/04/08/2260804.aspx

2012-02-03 16:06:48 456

转载 Unix grep正则表达式元字符

grep正则表达式元字符集(基本集) ^锚定行的开始 如:\'^grep\'匹配所有以grep开头的行。$锚定行的结束 如:\'grep$\'匹配所有以grep结尾的行。匹配一个非换行符的字符 如:\'gr.p\'匹配gr后接一个任意字符,然后是p。*匹配零个或多个先前字符 如:\'*grep\'匹配所有一个或多个空格后紧跟grep的行。 .*一起用代表任意字符。

2012-02-03 15:49:06 1809

转载 Unix grep 用法

如果您要在几个文本文件中查找一字符串,可以使用'grep’命令。‘grep’在文本中搜索指定的字符串。假设您正在‘/usr/src/linux/Documentation’目录下搜索带字符串‘magic’的文件:$ grep magic /usr/src/linux/Documentation/*sysrq.txt:* How do I enable the magic SysRQ

2012-02-03 15:48:31 5282

codeviewer

乱码查看

2011-11-11

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除