- 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
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
Mathieu NOE
2021 年 11 月 26 日
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
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Orange についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!