フィルターのクリア

Finding Particular Values In 3D Plots

7 ビュー (過去 30 日間)
Arjun Tandon
Arjun Tandon 2019 年 7 月 31 日
コメント済み: Arjun Tandon 2019 年 8 月 5 日
I have a very large matrix (62x60x1000) that represents x and y spatial coordinates, and 1000 frames (time coordinates). I was able to plot this data using the surf and drawnow commands; this plot revealed peaks and troughs in my data in the z-axis. I want to find the average of the peaks and troughs. I have attached a sample of the code I am using and the methodology:
%Data is a data structure I successfully imported from a .mat file.
WF=Data.WF; %Extracts the Wavefront data from the Data structure and forms the WF matrix.
%Note: The WF data is a 3D matrix with x,y,and t domains. The WF matrix is 62x60x1000.
frames=1000; %This corresponds to the number of frames to plot
figure(1)
for i=1:frames
surf(WF(:,:,i));
grid on;
xlabel('x')
ylabel('y')
zlabel('z')
drawnow
end
The code basically plays a movie as it iterates through the one thousand frames (it's not an actual movie). In the z-direction, there are peaks and troughs; the x-y directions form a shape and stay constant. I am interested in finding the average value of the data in the z-direction throughout all time (i.e. the average z-value for the 1000 frames). Below is an image of example data I am working with.

採用された回答

dpb
dpb 2019 年 8 月 1 日
"... finding the average value of the data in the z-direction throughout all time (i.e. the average z-value for the 1000 frames)"
Z=mean(WF,3);
That was tough, wasn't it... :)
  1 件のコメント
Arjun Tandon
Arjun Tandon 2019 年 8 月 5 日
Thanks DB! I think I was just overwhelmed (it's a long code with a lot of data).

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSmoothing and Denoising についてさらに検索

タグ

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by