formal initialisation of matrix
显示 更早的评论
Hi,
I would like to know if it's possible to create a matrix A by giving the value of every coefficient A(i,j). Something like that :
A(i,j) = i+j
I would like to do this directly when the matrix is created, not using the double for i, for j.
Thankyou for your answer,
采纳的回答
更多回答(4 个)
Titus Edelhofer
2014-4-9
0 个投票
Hi Julien,
often you can use the function meshgrid for this...
Titus
lvn
2014-4-9
0 个投票
Three alternative solutions posted here:
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!