How do I perform array assignment using the MATLAB C Math Library?
조회 수: 1 (최근 30일)
이전 댓글 표시
I would like to know the C Math Library equivalent operator for the following MATLAB array element assignment:
A(2,3) = 19;
채택된 답변
MathWorks Support Team
2009년 6월 27일
The MATLAB C Math Library includes a utility function called mlfIndexAssign that enables operations similar to MATLAB's array element assignment.
The following code illustrates the use of this function:
/* In MATLAB: A(2,3) = 19 */
mxArray *A = NULL;
mlfIndexAssign(&A, /* Destination array */
"(?,?)", /* Index format string */
mlfScalar(2), /* Subscript value */
mlfScalar(3), /* Subscript value */
mlfScalar(19)); /* Source array */
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!