How to reduce the grid size of 3D matrix, (quarter of its original size)
    10 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Dushantha Sandaruwan WIJENDRA NAIDHELAGE
 el 27 de Jul. de 2021
  
    
    
    
    
    Comentada: Dushantha Sandaruwan WIJENDRA NAIDHELAGE
 el 27 de Jul. de 2021
            I have grid data, (X,Y,T) x=lon,y=lat,t=time. The size of the data is (281*321*60), which is 0.25*0.25 grid data. I want to make it 1*1 grid. The final result should be (71*72*60). Kindly help me to do this. I know, how to interpolate and increase the resolution, but no idea how to reduce the resolution and increase the grid size. Thank you.
0 comentarios
Respuesta aceptada
  Simon Chan
      
 el 27 de Jul. de 2021
        Suppose A is your data where size is (281*321*60), try the following:
[Ny,Nx,~] = size(A);
idx1 = 1:4:Ny;
idx2 = 1:4:Nx;
B = A(idx1,idx2,:);
Noticed that the size of the result, B is (71*81*60)
size(B)
    71    81    60
1 comentario
Más respuestas (0)
Ver también
Categorías
				Más información sobre Interpolation 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!