[Help]+Matrix Operation

조회 수: 1 (최근 30일)
sheng
sheng 2012년 6월 13일
답변: Sweety 2024년 5월 9일
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!

답변 (2개)

Nirmal
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.

Sweety
Sweety 2024년 5월 9일
<<a=[1 2 3;1 2 3]

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by