How change only second number in a=ones(1,10)?
2 次查看(过去 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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!