Deleting Rows of a Matrix HELP
Mostrar comentarios más antiguos
I'm trying to delete the following rows within a matrix - ones in which the second column contains a 0. Importing the text file Data.txt, which has about 2901 rows of time readings, and associated pressure readings. Some of the pressure readings are 0, and we need to delete these readings. My code gives an assignment dimension mismatch error and I have not clue why. Could someone please help me out? Thanks and here's my code:
for row = 1:length(Data)
if Data(row,2) == 0
Data(row,2) = [];
end
end
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!