Meaning of square bracket
4 views (last 30 days)
Show older comments
x(2,:)=[];
0 Comments
Answers (1)
John D'Errico
on 13 Apr 2023
You probably need to do the basic MATLAB onramp tutorial, as this should be covered there. And it is free.
But this is how you can delete an element, or in this case the second row of the array x.
x = magic(4)
x(2,:) = []
0 Comments
See Also
Categories
Find more on Get Started with MATLAB 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!