Plot the electric field distribution ?
조회 수: 16 (최근 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(...)
댓글 수: 4
추가 답변 (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!