[Help]+Matrix Operation
1 回表示 (過去 30 日間)
古いコメントを表示
I found a program from internet, the following is the part code:
t=0:1/1e3:0.999;
a=randint(1,10);
b=ceil(10*t+0.01);
s=a(b);
% I do not know what a(b) means. a is 1*10 matrix,b is 1*1000 matrix.
Who can tell me, thank u!
0 件のコメント
回答 (2 件)
Nirmal
2012 年 6 月 13 日
b is being used as an index.
t is an array with elements incrementing my 0.999, which means b is also an array. Now elements of b is used as an index to construct s.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Multidimensional Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!