plotting 3 independent data and 1 response (output)
古いコメントを表示
Hello
I have data of 3 independent variables and one output. you can think of it as 3 columns of data and one response variable. I wonder if I can plot a surface that shows the variation in the respons or output variable as the other 3 data variables change.
Thank you
Aziz
採用された回答
その他の回答 (1 件)
William Rose
2021 年 3 月 23 日
0 投票
This version of the code reads 4D experimental data (x,y,z,p) from a file and plots it in multiple ways, like script I posted previously. Experimental data may not be exactly on a grid, or may have missing data points. Therefore the experimental data is interpolated and evaluated at all points on a 3D grid before plotting.
The output from the program is two figures with three plots each. Figure 1 (left) shows interpolated p versus x,y at a fixed level of z, and p vs. y,z at fixed x, and p versus x,z at fixed y. Figure 2 shows three iso-p-surfaces in x,y,z space, i.e. three surfaces, each of which has a constant value of p. These figures use datat file 3 described beow.
Attached files: the script to read, interpolate, and plot the data; four text files of simulated data to use as inputs to the program. Each text file has four columns: x,y,z,p. Simulated data files:
1. fourDdataGridN00.txt: 11x11x11 values of p on a regular x,y,z grid, with no measurement noise.
2. fourDdataRandN00.txt: 512 values of p at randomly chosen points in the sample volume, with no measurement noise.
3. fourDdataRandN02.txt: 512 values of p at randomly chosen points in the sample volume, with measurement amplitude=0.02.
4. fourDdataRandN04.txt: 512 values of p at randomly chosen points in the sample volume, with measurement amplitude=0.04.

カテゴリ
ヘルプ センター および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
