Afficher commentaires plus anciens
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 commentaires
Walter Roberson
le 27 Août 2019
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
le 27 Août 2019
Walter Roberson
le 27 Août 2019
Modifié(e) : Walter Roberson
le 28 Août 2019
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
le 28 Août 2019
Walter Roberson
le 28 Août 2019
Please show
scatter3(x, y, z)
Diab Abueidda
le 28 Août 2019
Diab Abueidda
le 29 Août 2019
Walter Roberson
le 29 Août 2019
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
le 31 Août 2019
Walter Roberson
le 31 Août 2019
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
le 31 Août 2019
Diab Abueidda
le 1 Sep 2019
Walter Roberson
le 1 Sep 2019
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
le 1 Sep 2019
Walter Roberson
le 1 Sep 2019
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
le 1 Sep 2019
Diab Abueidda
le 2 Sep 2019
Diab Abueidda
le 3 Sep 2019
Walter Roberson
le 5 Sep 2019
Sorry, nothing yet, I have been a bit busy.
Diab Abueidda
le 5 Sep 2019
Diab Abueidda
le 10 Sep 2019
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Surface and Mesh Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


