- extracting a 2D array (290x480) from your 3D array (290x480x90 ) out = in(:,:,k); where k is your frequency index
- use either interp2 or griddata for 2D interpolation
- griddata : Interpolate 2-D or 3-D scattered data
- interp2 : Interpolation for 2-D gridded data in meshgrid format
Accessing (interpolating?) data in 3D array
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Louise Wilson
il 25 Nov 2021
Commentato: Louise Wilson
il 28 Nov 2021
I have been using Matlab for many years but this is my first time working with a 3D array. My data is 290x480x90 in the format latitude x longitude x frequency. So it contains sound pressure data for a range of locations at different frequencies. I am wondering if I could then create a separate array e.g. 10x2x1 of lat/lon locations at a particular freq of interest that lie within the main array, and pull those data points out? Those specific locations of interest therefore don't necessarily occur as points of the 3D array but they are within it... hopefully that makes sense.
5 Commenti
Mathieu NOE
il 26 Nov 2021
yes , squeeze may be needed , even thought on my matlab release (R2020b) it seems not to be required (?)
i did this simple test and the output array dimension is like we wanted
>> a = randn(30,10,3);
>> b = a(:,:,1);
>> whos
Name Size Bytes Class Attributes
a 30x10x3 7200 double
b 30x10 2400 double
Risposta accettata
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Orange in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!