首页 > 其他 > 详细

octave 使用小记

时间:2014-01-21 23:40:38      阅读:529      评论:0      收藏:0      [点我收藏+]

1. ones(X)   ones(N, M) 

% return a matrix or N-dimensional array whose elements are all 1.

2. zeros(X) zeros(N, M)

% return a matrix or N-dimensional array whose elements are all 0.

3. rand(X) rand(N, M)

% return a matrix with random elements uniformly distributed on the interval (0,1).

4. hist(Y, X, NORM)

% produce histogram counts or plots.

5. eye(X) eye(N, M)

% return an identity matrix.

6. pwd

% return the current working directory.

7. cd dir

% change the current working directory to DIR.

8. who

% list variables

9. A(:)

% put all elements of A into a single vector.

10. A * B

% multiple

11. A .* B

% multiple each element

12. A‘

% matrix transpose

13. find

% example find specific rows

% idx = find(X(:, 2) == 8)

% Y = X(idx, :)

octave 使用小记

原文:http://www.cnblogs.com/arcticant/p/3529068.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!