curl+ndgrid/meshgrid in two dimensions

Dear all,
I am trying to compute the curl of a 2D velocity field. My grid is given in x and y direction by two vectors, xm and ym of size size_x and size_y respectively and non equispaced.
My velocity field (U,V) is defined such that
>> size(U)
ans =
size_x size_y
so I compute its curl by:
[Mxm,Mym]=meshgrid(xm,ym);
[curl,cav]=curl(Mxm,Mym,transpose(U),transpose(V));
Is there a way to compute such curl without performing any transposition?
Many thanks

Answers (0)

Categories

Find more on Fluid Dynamics in Help Center and File Exchange

Tags

Asked:

on 24 Jun 2015

Community Treasure Hunt

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

Start Hunting!