How to get matrix element A{1,2} at indices 1,2 from matrix A =@(x,y)
3 次查看(过去 30 天)
显示 更早的评论
How to get element with index 1,2 from matrix defined as function.
A =@(x,y) [x 1*x 2*x 3*x; y 5 6 7; 1 1 1 1; 2 3 4 5]
A(3,1) % evaluates the matrix for x=3 y =1
% How to get element at indices 1,2 A(3,1){1,2}=3 meaning 1*x = 3
2 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!