MSCBSC 移动通信论坛
搜索
登录注册
网络优化工程师招聘专栏 4G/LTE通信工程师最新职位列表 通信实习生/应届生招聘职位

【C友贴图区】

C友贴图和看图,请到此版
勿发违规图片

【C友开心吧】

C友交流开心笑话的区域
乐一乐,就在开心吧

【心情咖啡屋】

分享你的心情和通信生活
C友交流心情的地方

【求职招聘区】

招聘,求职,职业交流
讨论通信人的职场前景



  • 阅读:3573
  • 回复:0
[资料] matlab中size()函数的用法
yinkai_feng
新手上路
鎵嬫満鍙风爜宸查獙璇


 发短消息    关注Ta 

积分 -831
帖子 33
威望 4796 个
礼品券 0 个
专家指数 -1496
注册 2013-8-31
专业方向  通信
来自 武汉
回答问题数 0
回答被采纳数 0
回答采纳率 0%
 
发表于 2015-11-01 20:08:58  只看楼主  QQ
size():获取矩阵的行数和列数 (1)s=size(A),
当只有一个输出参数时,返回一个行向量,该行向量的第一个元素时矩阵的行数,第二个元素是矩阵的列数。
(2)[r,c]=size(A),
当有两个输出参数时,size函数将矩阵的行数返回到第一个输出变量r,将矩阵的列数返回到第二个输出变量c。
(3)size(A,n)如果在size函数的输入参数中再添加一项n,并用1或2为n赋值,则 size将返回矩阵的行数或列数。其中r=size(A,1)该语句返回的时矩阵A的行数, c=size(A,2) 该语句返回的时矩阵A的列数。
另外,length()=max(size()).

MATLAB help 解释 :
>> help size
sizeSize of array.
D = size(X), for M-by-N matrix X, returns the two-element row vector
D = [M,N] containing the number of rows and columns in the matrix.
For N-D arrays, size(X) returns a 1-by-N vector of dimension lengths.
Trailing singleton dimensions are ignored.

[M,N] = size(X) for matrix X, returns the number of rows and columns in
X as separate output variables.

[M1,M2,M3,...,MN] = size(X) for N>1 returns the sizes of the first N
dimensions of the array X.If the number of output arguments N does
not equal NDIMS(X), then for:

N > NDIMS(X), size returns ones in the "extra" variables, i.e., outputs
NDIMS(X)+1 through N.
N < NDIMS(X), MN contains the product of the sizes of dimensions N
through NDIMS(X).

M = size(X,DIM) returns the length of the dimension specified
by the scalar DIM.For example, size(X,1) returns the number
of rows. If DIM > NDIMS(X), M will be 1.

When size is applied to a Java array, the number of rows
returned is the length of the Java array and the number of columns
is always 1.When size is applied to a Java array of arrays, the
result describes only the top level array in the array of arrays.

Example:
If
X = rand(2,3,4);
then
d = size(X)returnsd = [2 3 4]
[m1,m2,m3,m4] = size(X)returnsm1 = 2, m2 = 3, m3 = 4, m4 = 1
[m,n] = size(X) returnsm = 2, n = 12
m2 = size(X,2)returnsm2 = 3
扫码关注5G通信官方公众号,免费领取以下5G精品资料
  • 1、回复“YD5GAI”免费领取《中国移动:5G网络AI应用典型场景技术解决方案白皮书
  • 2、回复“5G6G”免费领取《5G_6G毫米波测试技术白皮书-2022_03-21
  • 3、回复“YD6G”免费领取《中国移动:6G至简无线接入网白皮书
  • 4、回复“LTBPS”免费领取《《中国联通5G终端白皮书》
  • 5、回复“ZGDX”免费领取《中国电信5G NTN技术白皮书
  • 6、回复“TXSB”免费领取《通信设备安装工程施工工艺图解
  • 7、回复“YDSL”免费领取《中国移动算力并网白皮书
  • 8、回复“5GX3”免费领取《 R16 23501-g60 5G的系统架构1
  • 对本帖内容的看法? 我要点评





    笨蛋就是你,你就是个大笨蛋
     
    [充值威望,立即自动到帐] [VIP贵宾权限+威望套餐] 另有大量优惠赠送活动,请光临充值中心
    充值拥有大量的威望和最高的下载权限,下载站内资料无忧

    快速回复主题    
    标题 [资料] matlab中size()函数的用法" tabindex="1">
    内容
     上传资料请点左侧【添加附件】

    当前时区 GMT+8, 现在时间是 2026-06-13 09:40:24
    渝ICP备11001752号  Copyright @ 2006-2016 mscbsc.com  本站统一服务邮箱:mscbsc@163.com

    Processed in 0.368350 second(s), 11 queries , Gzip enabled
    TOP
    清除 Cookies - 联系我们 - 移动通信网 - 移动通信论坛 - 通信招聘网 - Archiver