spherical mesh using pdepe - matlab

I was wondering if it possible to have a spherical mesh using the pdepe function of Matlab? My system of pdes are defined in a sphere, so I want to solve accordingly. My internet search didn't give helpful results, unfortunately. Thank you in advance!

Related

Vibration analysis scilab

I have a problem to do a vibration analysis on scilab.
to explain, I have to make a vibration analysis of an engine in 2d and then in 3D (see pictures)
3d graph I want to obtain
the 2d graph obtained
My basic file consists of a CVS with two columns, with time and acceleration. I used the fft function for the 2D graph, but for the 3D I don't know how to do it.
The code for the 2D graph:
sample_rate=1/(Time(2)-Time(1));
N=max(size(Time));
freqfftDatas =[sample_rate*(0:(N/2))/N]';
FFT=fft(Datas(1:N));
n=max(size(freqfftDatas));
fftDatas =abs(FFT(1:n))*2/N;
plot(freqfftDatas, fftDatas);
I've read about waterfall, but I don't know how to relate it to my case.
If there are people familiar with scilab who could help me, I thank you!
For this kind of representation you have to use surf, here is an example with the sliding window FFT of a chirp like signal:
[t,u]=meshgrid(0:0.01:10,0:0.01:1);
y=sin((%pi*(t+u)).^2);
Y=fft(y,1,1);
clf
gcf().color_map=parulacolormap(128);
surf(abs(Y),"facecolor","interp")
gce().color_mode=-1

Animation of a point in a 3D plot

I need to create an animation of moving point without plotting actual trajectory. So I can't use comet3 or I don't understand how to use it in that way. I've found animatedline function which has properties that I need but I don't have this function in my Matlab 2014.
Could you give me any advice how to solve this problem?

create a quad mesh over an image matlab

I am trying to implement this paper
Patch based Image warping for Content aware Retargeting
I am half way through in its implementation in matlab, when I came across the warping using quad mesh. The section III.c suggests me to formulate the image as a quad mesh with vertices, edges and quad faces. I have searched, but did not get the concrete result as to how to do this in matlab. Can you please tell me how to represent image as a quad mesh in matlab? Thanks in advance.
Update :
Pics from the paper stating the requirements better. Can you also please see the paper and tell me if am looking for the right thing?

Matlab : Conversion of Triangular mesh to Regular (Square) Mesh

mI currently possess a triangular mesh model of a heart that is loaded into Matlab for further manipulation. The current problem is the that I require a regular (square) mesh model of the heart in order to perform proper texture mapping of an image. Can anyone provide a function or even another program that can convert the current TRIANGULAR mesh model to a regular SQUARE model? Thank you :)
I've had good results with the FEX submission GridTriMesh.

Mesh Generation in MATLAB

Is there any subroutine, in MATLAB, that takes in a list of points, and return me a good mesh that I can use to show to my colleagues, such as this?
Actually, all I need is just a simple 2D mesh generator that takes in a series of X, Y coordinates (that defines the boundary of the area), and give me back a list of elements that can mesh that area well. I can do the rest by using MATLAB command to interpolate the Z value.
Edit : I am not interested to use MATLAB to produce the above looking plot. I am interested in using a MATLAB library to obtain a list of elements so that when I plot those element myself (not in MATLAB itself; but in my own C# program), I can obtain this meshed surface.
PS: I know there is this DistMesh, but I am looking for something simpler - something built-in direct in MATLAB perhaps. And no, meshgrid is not mesh generation.
It sounds like you want to create a finite element mesh, starting with a set of points defining a boundary of a region and then generating a triangular mesh that creates more points within that region. I don't think there's a "simple" solution for this problem.
The closest "built-in" solution would probably be the Partial Differential Equation Toolbox, specifically some of the Geometry Algorithms like INITMESH and REFINEMESH.
The link you gave to DistMesh appears to be another good solution. There are also a few submissions on the MathWorks File Exchange that you could take a look at:
MESH2D by Darren Engwirda
Finite Element Toolbox 2.1 by Rasmus Anthin
That picture looks exactly like the one from the griddata documentation. The example in there looks like what you want.
SFTOOL will easily make the picture that you show.
A thin-plate spline, e.g., TPAPS, should also do the job.
I think the user-created 'gridfit' is the best I've come across for a single surface, much better/prettier than griddata.
Mesh generation as in Delaunay Triangulation + Steiner Points? There is a builtin Delaunay function in MATLAB.
If your surface is the z=f(x,y) form you can use:
http://www.advancedmcode.org/how-to-plot-a-coloured-surface-from-3d-scatter.html
If your surface is concave look for surface reconstruction on the same website.