How do you set entries in a matrix for odd rows with odd columns to zero?
    6 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    L'O.G.
 el 15 de Feb. de 2023
  
    
    
    
    
    Respondida: Dyuman Joshi
      
      
 el 15 de Feb. de 2023
            I want to set A(i,j) = 0 if both i and j are odd. Is this possible to do vectorially?
0 comentarios
Respuesta aceptada
  Dyuman Joshi
      
      
 el 15 de Feb. de 2023
        %random data for example
A = rand(6,7)
A(1:2:end,1:2:end)=0
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

