hi,
i am new to matlab. i need to draw divergence of function in 2d xy-graph. i found acode with help of that code i can plot vector it self and its 3d divergence. i have no idea how to create 2d of that same divergence.
below is the code i am using
x= -11:0.5:11 ;
y = x;
[x,y]=meshgrid(x,y);
div1=divergence(x,y,cos((pi*x)/7)*sin((pi*y)/7),cos((pi*y)/7)*sin((pi*x)/7));
figure;
subplot(1,2,1);
quiver(x,y,cos((pi*x)/7)*sin((pi*y)/7),cos((pi*y)/7)*sin((pi*x)/7));
title('funktion');
subplot(1,2,2);
plot(div1);
title('divergenz');
thanks for ur help
i am new to matlab. i need to draw divergence of function in 2d xy-graph. i found acode with help of that code i can plot vector it self and its 3d divergence. i have no idea how to create 2d of that same divergence.
below is the code i am using
x= -11:0.5:11 ;
y = x;
[x,y]=meshgrid(x,y);
div1=divergence(x,y,cos((pi*x)/7)*sin((pi*y)/7),cos((pi*y)/7)*sin((pi*x)/7));
figure;
subplot(1,2,1);
quiver(x,y,cos((pi*x)/7)*sin((pi*y)/7),cos((pi*y)/7)*sin((pi*x)/7));
title('funktion');
subplot(1,2,2);
plot(div1);
title('divergenz');
thanks for ur help