What does x(1,:) do in MATLAB ?
古いコメントを表示
What does x(1,:) do in MATLAB ?
eg:
at = sqrt(Po)*exp(-0.5*(1+i*C)*(tau./t0).^(2*m))
a0 = fft(at(1,:));
what does at(1,:) do here ?
2 件のコメント
Anil Chowdary Tummala
2021 年 4 月 21 日
Q1. What does x(1,:) do in MATLAB ?
Answer : It gives the first row of matrix 'x'
Q2. what does at(1,:) do here ?
Answer : it gives the first row of FFT coefficients of matrix 'at'
Anil Chowdary Tummala
2022 年 10 月 10 日
Thank you very much
採用された回答
その他の回答 (3 件)
Afissou ZONGO
2021 年 8 月 17 日
0 投票
X(i*2,:) means
1 件のコメント
Walter Roberson
2021 年 8 月 17 日
Take the current value of the variable i and multiply it by 2. Use the result as row indices to select entire rows of X.
The code shown does not require that i is a scalar or even a vector. It also does not require that the values in i are currently integer values, but if they are not then there is the risk that there could be an indexing error.
There are uncommon cases in which i would not necessarily have to be numeric, but you might never see that happen in practice.
Sorabh Mahajan
2022 年 2 月 27 日
0 投票
x = [x;i] meaining
1 件のコメント
Walter Roberson
2022 年 2 月 28 日
[A;B] is defined as being vertcat(A, B) which in turn is defined as being the same as cat(2,A,B)
That is, [x;i] takes the existing array x, and tries to place a new row containing i at the bottom of it. With the x= assignment that becomes the new x. The effect is to add the content of i to the bottom of x.
Antonio
2024 年 6 月 10 日
0 投票
x(1:2,1)? meaning
1 件のコメント
Steven Lord
2024 年 6 月 10 日
This performs "Indexing with Element Positions". In particular, "You can also reference multiple elements at a time by specifying their indices in a vector."
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!