changing value in a 2d array
显示 更早的评论
hi, thank you for your help.
I would like to know how to change values in a 2d array. For example, I have an 2d array A as of 1000x1000, of all zero values
I want to change value in position, 1x1, 1x100, 1x1000 to value 1.
do you know a quick way of doing this?
采纳的回答
更多回答(2 个)
charlie
2011-7-11
4 个评论
James Tursa
2011-7-11
Please post your code, or a simplified version of it that will show the problem you are having.
Oleg Komarov
2011-7-12
It doesn't loop, but it outputs the result on the command window. Use ";" as included in the code snippets to supress screen print.
bym
2011-7-12
agree with Oleg, just didn't post soon enough!
charlie
2011-7-12
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!