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!