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!