Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
I have a A ,15*15 matrice with random numbers , i wanna just get the values outside A (5:8 ,5:8) ,I mean A-A(5:8,5:8)?? i know subtract is not possible , becuase dimension is not same , how can i do this?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a A ,15*15 matrice with random numbers , i wanna just get the values outside A (5:8 ,5:8) ,I mean A-A(5:8,5:8)?? i know subtract is not possible , becuase dimension is not same , how can i do this?
0 Kommentare
Antworten (1)
Image Analyst
am 10 Mär. 2015
Try this:
A = randi(9, [15,15]); % Initial data
% Set middle rectangle to nans
A(5:8,5:8) = nan
% Extract numbers not in the NAN rectangle
output = A(~isnan(A))
0 Kommentare
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!