How to populate a matrix based on a function?
이전 댓글 표시
I have a 2d matrix of width 256 and height 128.
I also have some theoretical function: 127.5 * cos(pi * row_index) + col_index
I want to populate the cells of the matrix using this function so that the row_index/col_index pull from each cell as it is computed.
Ideally I need to use functions that can run against each cell in a matrix and also have access to the following variables:
- Current Column Index
- Current Row Index
- Current Cell Value (I'm not using this in the earlier example, but I'd like to be able to use it in the future)
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Phased Array System Toolbox에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!