Info
此问题已关闭。 请重新打开它进行编辑或回答。
How I can extract certain range of value from workspace?
2 次查看(过去 30 天)
显示 更早的评论
I have load 100x100 mat file into workspace. How can I extract certain range of values for example (5:10)x(5:10) from the workspace?
1 个评论
回答(1 个)
S. Walter
2020-11-4
You have a matrix A:
A = rand(100,100);
You want only the 5th through the 10th elements, you can do that using the colon operator:
B = A(5:10,5:10);
1 个评论
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!