필터 지우기
필터 지우기

use NaN in matrix to get a spherical shape

조회 수: 1 (최근 30일)
yonatan s
yonatan s 2017년 5월 6일
댓글: yonatan s 2017년 5월 6일
i want solve a pde in spherical coordinates, but failed to do so using the pde toolbox. my plan b is to use a matrix instead, and i want to know if i can insert NaN values to the cells i dont need in order to get the spherical shape, and still be able to run the equations over the matrix without any errors.
also, would i be able to plot the matrix, so only the cells with values will be visible?
if not, is it even possible to solve a 3d pde problem with spherical symmetry in matlab (version 2016b)?
  댓글 수: 2
John D'Errico
John D'Errico 2017년 5월 6일
Of course it is "possible". That you did not succeed is merely a reflection that you did not write the correct code.
Of course you CAN put NaNs in some cells. That part is easy. But be careful that those NaNs won't propagate.
I'd suggest you may be better off using a spherical coordinate system. Write the problem in a different form. Then solve it over the entire spherical domain.
yonatan s
yonatan s 2017년 5월 6일
you pretty much stated the obvious

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 PDE Solvers에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by