Finding Particular Values In 3D Plots
3 ビュー (過去 30 日間)
古いコメントを表示
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.
0 件のコメント
採用された回答
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... :)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!