Matlab基础复习(1)
来源:互联网 发布:同性题材网络剧泰国 编辑:程序博客网 时间:2024/05/27 00:56
Matlab 变量规则 :
1) 变量名区分大小写
2)变量名小于63位
3)变量名以字母开头
Matlab 常量表 :
i, j : 虚数单位
pi: 圆周率
eps: 浮点运算相对精度
NaN: Not-a-Number 不定值
Realmin: 最小的正浮点数, 2^(-1022)
Realmax: 最大的浮点数, 2^1023
Inf: 无穷大
字符串: 在Matlab中, 字符串都用单引号设定后输入或赋值
字符数组: e.g. SC=char(''a,'b','c');
在Matlab中, 字符串和字符数组基本上的等价的
数值数组与字符串的互相转换可以由double与cellstr实现
数值数组与字符串之间的转换函数表:
num2str
int2str
mat2str
str2num
sprintf: 将格式数据写为字符串
sscanf: 在格式控制下读字符串
字符串操作表:
strcat: 连接字符串
strvcat: 垂直连接字符串
strcmp: TF = strcmp(S1,S2) compares the strings S1 and S2 and returns logical 1 (true) if they are identical, and returns logical 0 (false) otherwise.
strncmp: 比较前n个字符串
findstr: K = findstr(S1,S2) returns the starting indices of any occurrences of the shorter of the two strings in the longer.
strmatch:
I = strmatch(STR, STRARRAY) looks through the rows of the character
array or cell array of strings STRARRAY to find strings that begin
with the string contained in STR, and returns the matching row indices.
Any trailing space characters in STR or STRARRAY are ignored when
matching. strmatch is fastest when STRARRAY is a character array.
strrep:
- Matlab基础复习(1)
- java基础复习--1
- html复习1:基础
- javascript复习1:基础
- JAVA基础复习1
- 复习javascript基础 (1)
- C++复习基础1
- JavaSE基础复习-1
- JAVA基础复习1
- java基础复习1
- Linux基础复习1
- java基础复习--复习总结1
- Csharp基础复习(1):介绍
- java基础复习(1)
- JavaWeb基础(复习1)
- java基础复习(1)
- Struts2基础复习系列(1)
- JavaScript基础内容复习1
- 重新修改git repo中的head
- nginx使用sock方式调用php-fpm
- TCP协议中FLAG的含义
- 微信公众号营销别“误入歧途”
- applicationContext、quartzConfig配置
- Matlab基础复习(1)
- [Ext JS 4] 实战之多选下拉单 (带checkbox) 续 - 带ALL 选项
- 三范式数据库设计和反范式的思考(转)
- [Hb-IX] 编写子程序(显示字符串、数值,除法溢出问题)
- 关于Android签名证书的生成过程
- collection,list,map 排序
- 队列(1)----用链表实现队列
- MarioTCP:一个单机可日30亿的百万并发长连接服务器
- sqlite sqlite3_bind_int sqlite3_bind_text