|||
Syntax: zeros_square=zeros(3);
Output: 0 0 0
0 0 0
0 0 0
Syntax: zeros_2by3=zeros(2,3);
Output: 0 0 0
0 0 0
Syntax: ones_square=ones(2);
Output: 1 1
1 1
Syntax: ones_3by5=ones(3,5);
Output: 1 1 1 1 1
1 1 1 1 1
1 1 1 1 1
Syntax: threes_2by3=3*ones(2,3);
Output: 3 3 3
3 3 3
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2025-1-10 11:01
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社