Curl, Divergence calculation from velocity data
9 views (last 30 days)
Show older comments
Hi,
I have calculate the Curl, Divergence from the velocity data file available in 4650 x 4 array. Here 1, 2, 3, and 4 columns reprsents x, y, u, v. I have tried with below script, but I am getting some error. Please help..
X = data (:,1);
Y = data (:,2);
UU = data (:,3);
VV = data (:,4);
[X,Y] = meshgrid(X,Y);
[UU, VV] = meshgrid(UU,VV);
f = curl(UU,VV);
2 Comments
Sudheer Bhimireddy
on 6 Aug 2020
"some error" doesn't help much. Post your error so that we can help.
Answers (3)
Bruno Luong
on 7 Aug 2020
Edited: Bruno Luong
on 7 Aug 2020
Your data is already gridded, no need to gridded on top of it
load('matlab.mat')
UU=reshape(data(:,3),[75 62]);
VV=reshape(data(:,4),[75 62]);
X=reshape(data(:,1),[75 62]);
Y=reshape(data(:,2),[75 62]);
close all
figure
quiver(X,Y,UU,VV);
f = curl(UU,VV);
figure
imagesc(f');
See Also
Categories
Find more on Visual Exploration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!