Ältere Kommentare anzeigen
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 Kommentare
Walter Roberson
am 27 Aug. 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
am 27 Aug. 2019
Walter Roberson
am 27 Aug. 2019
Bearbeitet: Walter Roberson
am 28 Aug. 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
am 28 Aug. 2019
Walter Roberson
am 28 Aug. 2019
Please show
scatter3(x, y, z)
Diab Abueidda
am 28 Aug. 2019
Diab Abueidda
am 29 Aug. 2019
Walter Roberson
am 29 Aug. 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
am 31 Aug. 2019
Walter Roberson
am 31 Aug. 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
am 31 Aug. 2019
Diab Abueidda
am 1 Sep. 2019
Walter Roberson
am 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
am 1 Sep. 2019
Walter Roberson
am 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
am 1 Sep. 2019
Diab Abueidda
am 2 Sep. 2019
Diab Abueidda
am 3 Sep. 2019
Walter Roberson
am 5 Sep. 2019
Sorry, nothing yet, I have been a bit busy.
Diab Abueidda
am 5 Sep. 2019
Diab Abueidda
am 10 Sep. 2019
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


