Mostrar comentarios más antiguos
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 comentarios
Walter Roberson
el 27 de Ag. de 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
el 27 de Ag. de 2019
Walter Roberson
el 27 de Ag. de 2019
Editada: Walter Roberson
el 28 de Ag. de 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
el 28 de Ag. de 2019
Walter Roberson
el 28 de Ag. de 2019
Please show
scatter3(x, y, z)
Diab Abueidda
el 28 de Ag. de 2019
Diab Abueidda
el 29 de Ag. de 2019
Walter Roberson
el 29 de Ag. de 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
el 31 de Ag. de 2019
Walter Roberson
el 31 de Ag. de 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
el 31 de Ag. de 2019
Diab Abueidda
el 1 de Sept. de 2019
Walter Roberson
el 1 de Sept. de 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
el 1 de Sept. de 2019
Walter Roberson
el 1 de Sept. de 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
el 1 de Sept. de 2019
Diab Abueidda
el 2 de Sept. de 2019
Diab Abueidda
el 3 de Sept. de 2019
Walter Roberson
el 5 de Sept. de 2019
Sorry, nothing yet, I have been a bit busy.
Diab Abueidda
el 5 de Sept. de 2019
Diab Abueidda
el 10 de Sept. de 2019
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Surface and Mesh Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


