MATLAB Answers

How do I plot the equipotential lines in matlab?

23 ビュー (過去 30 日間)
Genesis Felipe
Genesis Felipe 2021 年 4 月 8 日 8:15
回答済み: KSSV 2021 年 4 月 8 日 9:36
How do I plot the equipotential lines in matlab (matlab novice here) from the calculated electric potential of a thin rod with ends at -0.5 m and 0.5 m, and has a non-uniform linear charge density of the form: lambda=sin(pi*x/L).
Thank you!

回答 (1 件)

KSSV
KSSV 2021 年 4 月 8 日 9:36
L = 1 ;
x = linspace(-0.5,+0.5) ;
lambda = sin(pi*x/L) ;
plot(x,lambda)

Community Treasure Hunt

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

Start Hunting!

Translated by