Create a function file that evaluates either the gradient, divergence, or curl given a scalar or a vector field.
1 次查看(过去 30 天)
显示 更早的评论
For the function name and arguments use [V] = vec_diff(A,sys,operation)
Where: V – the output of vector differentiation, it can either be a scalar field or a vector field A – input scalar field or vector field sys – the coordinate system of the input and output operation – specifies whether gradient, divergence or curl will be performed. Include error handling procedures when the inputs are outside the possible cases. For example, the gradient of a vector field makes no sense. Built-in MATLAB functions gradient, divergence and curl are NOT allowed. For the variables, use the following:
x, y, z, rho, phi, r, th (theta)
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Encryption / Cryptography 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!