matlab基础

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, DurhamNC 27708-0287
Henri Gavin, Ph.D., P.E., Associate Professor


Links to some Matlab tutorials
  1. The Mathworks ``Student Center''
  1. Matlab Documentation, The Mathworks
  1. Day 1 of a two-day tutorial from MIT, Cambridge, MA
  1. Day 2 of a two-day tutorial from MIT, Cambridge, MA
  1. Matlab basics and a little beyond, David Eyre, University of Utah
  1. A Matlab plotting tutorial, Bohe Wang, West Virginia University
  1. Physical Modeling in Matlab by Allen B. Downey (a 133 page book).
  1. Matlab Tutorials from Southern Illinois University
  1. Matlab Summary and Tutorial from the University of Florida, Gainsville, FL
  1. Matlab Primer, 3rd edition, by Kermit Sigmond, University of Florida
  1. Debugging Matlab m-Files, Purdue University
  1. ODE software for Matlab, from Rice University
  1. Engineering Vibration Toolbox, from Wright State University
  1. Links to several free Matlab-compatible toolboxes
  1. ode4u.m ... A simple, constant step size ODE solver

Links to some Tutorials on Animations in Matlab
  1. Animation in Matlab, from US Naval Academy
  1. Animation in Matlab, from Gustavus Adolphus College

Links to some Simulink tutorials
  1. Simulink Tutorials, from the University of Michigan
  1. Simulink Tutorial, Lou Russo, Rennselear Polytechnic University
  1. Simulink Tutorial, Tom Nguyen
  1. Introduction to Simulink, Jonathan Hill, Worchester Polytechnic University

Links to some Matlab books
  1. Introduction to Numerical Methods and MATLAB: Implementations and Applications by Gerald W. Recktenwald, Gerald W. Reckenwald
  1. Prentice Hall, 2001; ISBN: 0201308606
  1. Mastering MATLAB 6, by Duane Hanselman, Bruce R. Littlefield.
  1. Prentice Hall, 2000; ISBN: 0130194689
  1. An Engineer's Guide to Matlab, by Edward B. Magrab et al.
  1. Prentice Hall, 2000; ISBN: 0130113352
  1. Introduction to MATLAB for Engineers and Scientists, by Delores Etter.
  1. Prentice Hall, 1995; ISBN: 0135197031
  1. Getting Started with MATLAB 5, A Quick Introduction for Scientists and Engineers, by Rudra Pratap.
  1. Oxford University Press, 1988; ISBN: 0195129474
  1. Matlab for Engineers, by Joe King.
  1. Addison-Wesley Pub Co, 1988; ISBN: 0201350947
  1. Introduction to Matlab 6 for Engineers, by William J. Palm.
  1. McGraw-Hill, 2000; ISBN: 0072349832
  1. MATLAB(r) Programming for Engineers, by Stephen J. Chapman.
  1. Brooks/Cole Pub Co, 1999; ISBN: 0534951511
  1. Introduction to Engineering Programming: in C, MATLAB and JAVA by Mark Austin and David Chancogne
  1. John Wiley & Sons; ISBN: 0471001163
  1. Introduction to Matlab 6 (Esource--The Prentice Hall Engineering Source) by Dolores Etter, David Kuncicky, Doug Hull.
  1. Prentice Hall, 2001; ISBN: 0130328456
  1. A bibliography of Matlab-based books from the Math-Works

一、matlab格式数值

  

format使用双精度执行所有计算。仅影响显示方式,不影响计算和存储方式。format默认是5位刻度输入format long 输入π显示π=3.14159265358979。显示15位数。

 

format:设置输出格式

浮点性变量,缺省为format short.

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 short.

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的命令

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值