Curl Function for 3D data using meshgrid and interpolation function

조회 수: 4 (최근 30일)
israr ahmad
israr ahmad 2018년 8월 3일
편집: israr ahmad 2018년 8월 3일
Hi all.
I have extracted a data set from COMSOL software which consists of coordinates, x y z,in mm and velocity u v w, in m/s. The value is extracted at XY Plane, keeping Z-cordinates fixed at a point which so that the matrix [x y z u v w] dimension is 124*6. The excel file is attached here with. However, when i try to calculate Curl for the same, the below error is appeared. Warning: The underlying triangulation is empty - the points may be coplanar or collinear. > In Curl3D at 10 Error using curl (line 54) U,V must all be size 2x2 or greater. > In Curl3D at 8 I have written the following code. clc; clear all; Matrix = xlsread('3dvelfield.xlsx'); [x,y,z] = meshgrid(0:0.05:3,0:0.05:3,0.05); Fu = scatteredInterpolant(Matrix(:,1),Matrix(:,2),Matrix(:,3),Matrix(:,4)); Fv = scatteredInterpolant(Matrix(:,1),Matrix(:,2),Matrix(:,3),Matrix(:,5)); Fw = scatteredInterpolant(Matrix(:,1),Matrix(:,2),Matrix(:,3),Matrix(:,6)); u = Fu(x,y,z); v = Fv(x,y,z); w = Fw(x,y,z); curl(x,y,z,u,v,w)
P.S.: When, i deal with only 2D case for the same problem discussed above. The simulation runs successfully
Can anyone please help me with this problem. I will be very grateful. Thanks in advance

답변 (0개)

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by