且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为矩阵的每一行设置特定列的值

更新时间:2021-08-30 23:00:06

我使用

I solved it using the sub2ind function:

A(sub2ind(size(A), 1:numel(a), a')) = 1