accessing data in multiple pixels (x,y) in 3D matrix (t,x,y)
1 次查看(过去 30 天)
显示 更早的评论
Hi,
I am a beginner in Matlab. I am trying to average time series (t) of selected multiple pixels in 3D matrix (t,x,y). I could obtain two 1D vectors for x and y indexes, but have problems when accessing 1D time series data for all the selected pixels in 3D matrix. Would someone know how to do that without using loop?
Best,
0 个评论
采纳的回答
Iain
2013-5-22
Matrix_2D = reshape(Matrix_3D,[timesamples numberofpixels]);
Determine the pixel numbers you want (1 = top left, 2 = 1 below that... etc.) and put them in a vector. "V"
Selected_pixel_timeseries = Matrix_2D(:,V);
You can then simply take the mean of each row to get the average of each frame.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!