首页 > 其他 > 详细

Matlab中可以给矩阵里一些单个点赋值的函数

时间:2016-03-04 10:23:16      阅读:285      评论:0      收藏:0      [点我收藏+]

sub2ind Linear index from multiple subscripts.
sub2ind is used to determine the equivalent single index
corresponding to a given set of subscript values.

IND = sub2ind(SIZ,I,J) returns the linear index equivalent to the
row and column subscripts in the arrays I and J for a matrix of
size SIZ.

IND = sub2ind(SIZ,I1,I2,...,IN) returns the linear index
equivalent to the N subscripts in the arrays I1,I2,...,IN for an
array of size SIZ.

I1,I2,...,IN must have the same size, and IND will have the same size
as I1,I2,...,IN. For an array A, if IND = sub2ind(SIZE(A),I1,...,IN)),
then A(IND(k))=A(I1(k),...,IN(k)) for all k.

Class support for inputs I,J:
float: double, single
integer: uint8, int8, uint16, int16, uint32, int32, uint64, int64

摘抄于help文档,有进一步理解时再补充

Matlab中可以给矩阵里一些单个点赋值的函数

原文:http://www.cnblogs.com/Dontstop/p/5241066.html

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