How to extract slice of 3D PDE solution into a matrix? Works with slice to plot, but want the actual date
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello all,
I have a 3D PDE solution.
I want to extract a slice of this solution into a matrix to do further analysis (I want to calculate the gradient and plot the solution just at a plane).
Here is my code so far:
[X,Y,Z] = meshgrid(-47:1:54,-72:1:29,-50:1:50);
%results is the result of my PDE calculation
V = interpolateSolution(results,X,Y,Z);
%xslice is the x plane I want to investigate
slice(X,Y,Z,V,xslice,[],[])
The result is a plot of the plane I would like to do further analysis on, however the result of the slice is an object, not a matrix. Is there a way to extract this slice into matrix form somehow?
0 Commenti
Risposte (1)
Precise Simulation
il 11 Dic 2017
The slice is a graphics handle object which you can extract the data from, for example (use get(h) to see what data is available):
h = slice(X,Y,Z,V,xslice,[],[]);
x = get(h,'xdata');
y = get(h,'ydata');
z = get(h,'zdata');
0 Commenti
Vedere anche
Categorie
Scopri di più su Geometry and Mesh in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!