what this colon mean in this code
1 回表示 (過去 30 日間)
古いコメントを表示
buf(:,:) = abs(p(:,1,:)); norm_buf=buf./max(max(buf));
i have this code as a part of program but i did not get what is mean
0 件のコメント
採用された回答
Star Strider
2017 年 4 月 27 日
The colons here mean all the elements in that particular ‘page’ of the matrix. See the documentation for colon,: (link) for the details.
2 件のコメント
Star Strider
2017 年 4 月 27 日
I will do my best.
For example if ‘p’ is a (2x3x4) matrix, ‘p(:,1,:)’ is the same as: ‘p(1:2,1,1:4)’.
Writing ‘p(:,1,:)’ is easier, especially if the size of ‘p’ changes either within a particular script, or between different runs of the script or calls to a function.
その他の回答 (0 件)
参考
カテゴリ
Help Center および 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!