How change only second number in a=ones(1,10)?
5 次查看(过去 30 天)
显示 更早的评论
0 个评论
采纳的回答
更多回答(1 个)
Jaime Abad Arredondo
2024-1-16
You should look at the syntax for array slicing. In matlab it's fairly easy. You would do something like:
a=ones(1,10);
disp(a)
a(2)=2;
disp(a)
Cheers!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Operators and Elementary Operations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!