gradient_sym(V,X,coordinate_system)
This Function calculates the gradient of 3D scalar function in Cartesian, Cylindrical, and Spherical coordinate system.
function gradientSym = gradient _sym(V,X,coordinate_system)
V is the 3D scalar function
X is the parameter which the gradient will calculate with respect to.
coordinate_system is the kind of coordinate system at which the vector field is specified.
the gradient is calculated according to (Engineering Electromagnetics Sixth Edition William H. Hayt, Jr. . John A. Buck)
Example (1):
V=24*cos(pi*y/3)*sin(2*pi*z/3)
gradient_sym(V,[x,y,z],'Cartesian')
Example (2):
V=Vo*exp(-2*r)*sin(3*phi)
gradient_sym(V,[r,phi,z],'Cylindrical')
Example (3):
V=Vo*a/R*cos(2*th)
gradient_sym(V,[R,th,phi],'Spherical')
引用
mohamed fekry (2025). gradient_sym(V,X,coordinate_system) (https://www.mathworks.com/matlabcentral/fileexchange/66482-gradient_sym-v-x-coordinate_system), MATLAB Central File Exchange. に取得済み.
MATLAB リリースの互換性
プラットフォームの互換性
Windows macOS Linuxカテゴリ
- MATLAB > Mathematics > Linear Algebra >
タグ
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!バージョン | 公開済み | リリース ノート | |
---|---|---|---|
1.0.0.0 |