I want to fix the zeros values in their same indices in certain two matrices A and B (to not be updated) in a cost function?
2 次查看(过去 30 天)
显示 更早的评论
I want to build a cost function, I want to fix the zeros values in their same indices in certain two matrices A and B (to not be updated) .
for example this is matrix A:
A = [ 0.1 0.2 0
0.2 0.8 0
0 0 0.7 ]
and I want to update this matrix by some computions, but I want to keep the zero values in their same indices and not update them.
Is there any sugestion to do that?
and in general is there a method to fix values in their same indices ( I mean do the calculation on the all values in this matrix but dont change these values; in my case the zero values)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Get Started with Optimization Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!