3D plot help
이전 댓글 표시
Hi,
I have a row data composed of independent variables x, y, and z and a dependent variable D, and I would like to 3d plot the geometry. Each independent and dependent variable is a 1D array. However, all 3d plotting functions that I am aware of such as isosurface require 3D arrays. My question is how I can transfom the different arrays into 3d arrays, given that they are not uniform.
댓글 수: 21
Walter Roberson
2019년 8월 27일
griddata() .
Or possibly you could
ux = unique(x);
uy = unique(y);
uz = unique(z);
D3 = reshape(D, length(ux), length(uy), length(uz));
and then isosurface() on D3
Diab Abueidda
2019년 8월 27일
Walter Roberson
2019년 8월 27일
편집: Walter Roberson
2019년 8월 28일
Your original line about "Each independent and dependent variable is a 1D array." was not clear. If each one is a 1D array, then that would imply that the variables are independent and that you have all combinations of values available. If that is not the case, then see griddata() that I mentioned before.
Diab Abueidda
2019년 8월 28일
Walter Roberson
2019년 8월 28일
Please show
scatter3(x, y, z)
Diab Abueidda
2019년 8월 28일
Diab Abueidda
2019년 8월 29일
Walter Roberson
2019년 8월 29일
I think I will need the data to play with. It is not obvious from the scatter plot that any semi-regular structure exists inside that at all.
Diab Abueidda
2019년 8월 31일
Walter Roberson
2019년 8월 31일
I will need the D as well.
I was correct in my original speculation that you have a regular 3D grid of data.
Diab Abueidda
2019년 8월 31일
Diab Abueidda
2019년 9월 1일
Walter Roberson
2019년 9월 1일
I did have a look, but I couldn't figure out why I was getting the visuals that I was getting.
One thing I do not understand is why you assign 0.5 to locations in the margins, considering that the value distribution is "a lot of values near 0.1" and "a lot of values near 0.9" together with an equal but much smaller distribution of values in-between. It would seem more natural to assign 0 or nan to the margin.
Diab Abueidda
2019년 9월 1일
Walter Roberson
2019년 9월 1일
When I look at the data with a 3D visualizer, I can see that there is something that is roughly X shaped, and I do not see anything special happening in the margins. I do not understand why a higher cutoff is being assigned than the values.
If you let H be high values near 0.9, and L be low values near 0.01 then you get a shape that near the top is roughly
HHLLLLLLLLHH
LHHLLLLLLHHL
LLHHLLLLHHLL
LLLHHLLHHLLL
LLLLHHHHLLLL
and I do not understand why you want to modify that to
MMMMMMMMMMMM
MHHLLLLLLHHM
MLHHLLLLHHLM
MLLHHLLHHLLM
MLLLHHHHLLLM
This introduces a "flange" into the visuals that I do not see a purpose for.
Diab Abueidda
2019년 9월 1일
Diab Abueidda
2019년 9월 2일
Diab Abueidda
2019년 9월 3일
Walter Roberson
2019년 9월 5일
Sorry, nothing yet, I have been a bit busy.
Diab Abueidda
2019년 9월 5일
Diab Abueidda
2019년 9월 10일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 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!


