How change only second number in a=ones(1,10)?
Show older comments
Accepted Answer
More Answers (1)
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!
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!