- give the shape formed by rotation around X=Y=0
- correctly return NaN for values outside the data domain.
Interpolate Data associated to cartesian meshgrid to all direction (like polar interpolation)
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Mahardika Firjatullah
el 4 de Abr. de 2022
Comentada: Mahardika Firjatullah
el 5 de Abr. de 2022
so i have data of pressure in 1 direction only, since this is just a point source i can assure that the distribution in all direction are the same. so i would like to kind of sweep these value to all direction, the ilustration is given as following
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/952544/image.png)
i know how to do this if i use polar coordinate as the meshgrid and then uses pol2chart to convert to cartesian coordinate, but for my particular purpose i need the meshgrid is in cartesian and i dont know how to do this.
hope someone can helps
0 comentarios
Respuesta aceptada
Stephen23
el 4 de Abr. de 2022
Interpolating in 1D to:
R = 0:20:10000;
P = 5000./R.^0.15;
plot(R,P)
[Xq,Yq] = meshgrid(-10000:20:10000);
Rq = sqrt(Xq.^2+Yq.^2);
Pq = interp1(R,P,Rq(:));
Pq = reshape(Pq,size(Rq));
surf(Xq,Yq,Pq,'EdgeColor','none')
Más respuestas (0)
Ver también
Categorías
Más información sobre Interpolation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!