Plot the electric field distribution ?
63 次查看(过去 30 天)
显示 更早的评论
how Plot the electric field distribution above the contour ?
% Plot the electric field distribution
figure;
v_now;
[ex,ey]=gradient(v);
quiver(-ex,-ey); %Quiver command creates a plot, E=-grad(V), hence the negative sign
title('potential ')
how put contour in the same figure of electric field distribution?
0 个评论
采纳的回答
Mischa Kim
2014-3-17
编辑:Mischa Kim
2014-3-17
Use hold all before or after the first plot command:
quiver(...) % replace the dots with your data
hold all;
contour(...)
更多回答(1 个)
Antonio Cedillo Hernandez
2020-4-21
Here you have the full MATLAB code explained (in spanish but the first comment is the code): https://www.youtube.com/watch?v=k9srU6aQfL0
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Vector Fields 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!