matlab博客:http://www.cnblogs.com/tiandsp/category/348031.html
matlab教程:http://people.duke.edu/~hpgavin/matlab.html
A Partial List of On-Line Matlab Tutorials and Matlab Books
A Partial List of On-Line Matlab Tutorials and Matlab Books
Department of Civil and Environmental Engineering
Edmund T. Pratt School of Engineering
Duke University - Box 90287, Durham, NC 27708-0287
Henri Gavin, Ph.D., P.E., Associate Professor
Links to some Matlab tutorials
- Physical Modeling in Matlab by Allen B. Downey (a 133 page book).
Links to some Tutorials on Animations in Matlab
Links to some Simulink tutorials
Links to some Matlab books
- Introduction to Numerical Methods and MATLAB: Implementations and Applications by Gerald W. Recktenwald, Gerald W. Reckenwald
- Prentice Hall, 2001; ISBN: 0201308606
- Mastering MATLAB 6, by Duane Hanselman, Bruce R. Littlefield.
- Prentice Hall, 2000; ISBN: 0130194689
- An Engineer's Guide to Matlab, by Edward B. Magrab et al.
- Prentice Hall, 2000; ISBN: 0130113352
- Introduction to MATLAB for Engineers and Scientists, by Delores Etter.
- Prentice Hall, 1995; ISBN: 0135197031
- Oxford University Press, 1988; ISBN: 0195129474
- Matlab for Engineers, by Joe King.
- Addison-Wesley Pub Co, 1988; ISBN: 0201350947
- Introduction to Matlab 6 for Engineers, by William J. Palm.
- McGraw-Hill, 2000; ISBN: 0072349832
- MATLAB(r) Programming for Engineers, by Stephen J. Chapman.
- Brooks/Cole Pub Co, 1999; ISBN: 0534951511
- Introduction to Engineering Programming: in C, MATLAB and JAVA by Mark Austin and David Chancogne
- John Wiley & Sons; ISBN: 0471001163
- Introduction to Matlab 6 (Esource--The Prentice Hall Engineering Source) by Dolores Etter, David Kuncicky, Doug Hull.
- Prentice Hall, 2001; ISBN: 0130328456
一、matlab格式数值
format使用双精度执行所有计算。仅影响显示方式,不影响计算和存储方式。format默认是5位刻度输入format long 输入π显示π=3.14159265358979。显示15位数。
format:设置输出格式
format并不影响matlab如何计算和存储变量的值。对浮点型变量的计算,即单精度或双精度,按合适的浮点精度进行,而不论变量是如何显示的。对整型变量采用整型数据。整型变量总是根据不同的类(class)以合适的数据位显示,例如,3位数字显示显示int8范围 -128:127。
format short, long不影响整型变量的显示。
format long 显示15位双精度,7为单精度(scaled fixed point)
format short 显示5位(scaled fixed point format with 5 digits)
format short eng 至少5位加3位指数
format long eng 16位加至少3位指数
format hex 十六进制
format bank 2个十进制位
format + 正、负或零
format rat 有理数近似
format short 缺省显示
format long g 对双精度,显示15位定点或浮点格式,对单精度,显示7位定点或浮点格式。
format short g 5位定点或浮点格式
format short e 5位浮点格式
format long e 双精度为15位浮点格式,单精度为7为浮点格式
二、绘图命令
(1)直方图的绘制
hist的命令
n = hist(Y) %默认间隔为10
n = hist(Y,x)
n = hist(Y,nbins) %设置nbins个条状
[n,xout] = hist(...)
hist(...)
hist(axes_handle,...)
x = -4:0.1:4;
y = randn(10000,1); %服从高斯分布的数据
hist(y,x)
imhist的命令
n = hist(Y,x)n = hist(Y,nbins) %设置nbins个条状
[n,xout] = hist(...)
hist(...)
hist(axes_handle,...)
y = randn(10000,1); %服从高斯分布的数据
hist(y,x)
一、matlab格式数值
format使用双精度执行所有计算。仅影响显示方式,不影响计算和存储方式。format默认是5位刻度输入format long 输入π显示π=3.14159265358979。显示15位数。
format:设置输出格式
format并不影响matlab如何计算和存储变量的值。对浮点型变量的计算,即单精度或双精度,按合适的浮点精度进行,而不论变量是如何显示的。对整型变量采用整型数据。整型变量总是根据不同的类(class)以合适的数据位显示,例如,3位数字显示显示int8范围 -128:127。
format short, long不影响整型变量的显示。
format long 显示15位双精度,7为单精度(scaled fixed point)
format short 显示5位(scaled fixed point format with 5 digits)
format short eng 至少5位加3位指数
format long eng 16位加至少3位指数
format hex 十六进制
format bank 2个十进制位
format + 正、负或零
format rat 有理数近似
format short 缺省显示
format long g 对双精度,显示15位定点或浮点格式,对单精度,显示7位定点或浮点格式。
format short g 5位定点或浮点格式
format short e 5位浮点格式
format long e 双精度为15位浮点格式,单精度为7为浮点格式
二、绘图命令
(1)直方图的绘制
hist的命令
n = hist(Y) %默认间隔为10
x = -4:0.1:4;
imhist的命令