extracting data from a multidimensional array
显示 更早的评论
I have a multidimensional array (named "Xgrid") that is 52x151x43 (52 "pages", each with 151 rows and 43 columns). The rows and columns are excitation and emission data (ex and em in the examples below). I have already done a meshgrid step to to define ex and em over the relevant data interval:
[ex,em] = meshgrid(240:5:450,300:2:600)
I would like to extract paired data from each "page" of data. I know I can do this with the find function, but when I run it I end up with a single data point rather than one from each "page". For example, I get only a single value for Bpeak after running the lines below, rather than a 52x1 matrix containing Bpeak for each page:
B = find(ex==275 & em==310)
Bpeak = Xgrid(B)
Any advice on how to do this would be greatly appreciated! Thank you very much in advance.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!