Switching a Boundary Condition to Spherical Coordinates
1 次查看(过去 30 天)
显示 更早的评论
I am working with a problem on a sphere where I have a formula which gives me the coordinates of a number of nodes distributed at equal distances from each other around a sphere in spherical polar coordinates, so if there are 100 nodes, I can use the formula to get a vector which is 3 x 100, each column corresponding to one of the nodes and then 3 entries for theta, phi, r.
For a boundary condition, I then need to create a 300 x 1 column vector, where you build the column by going to node 1, take cos of its theta component in first row, sin theta in second row, then 0 in the third row. You then go to next node and repeat this and move down the column until it is 300 x 1. What would be the easiest way of doing this?
Let me know if further explanation required.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!