How to convert a 1D solution to 2D using spherical axis symmetry

조회 수: 6 (최근 30일)
Sayan Adhikari
Sayan Adhikari 2015년 4월 13일
댓글: pfb 2015년 4월 14일
Consider a 1D problem of the nature y =f(x). Now I want to get the solution in 2D using spherical symmetry. After getting the solution not evaluating. The attached file is a trial of my aim. But I got translational instead of rotational.
THE 1D PROFILE
THE 2D PROFILE I WANT
THE 2D PROFILE I GOT

채택된 답변

Torsten
Torsten 2015년 4월 13일
plot
u(x,y)=f(5+sqrt((x-5)^2+(y-5)^2))
Best wishes
Torsten.
  댓글 수: 5
Sayan Adhikari
Sayan Adhikari 2015년 4월 14일
Thanks a lot..This is what I wanted. Sorry the cosine thing was a typo error. I didn't notice it.
pfb
pfb 2015년 4월 14일
Which one did you use? Mine or Thorsten's?

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

추가 답변 (1개)

pfb
pfb 2015년 4월 13일
This is not very clear. What do you mean by "the solution of a 1D problem of the nature y=f(x)"?
It seems to me you're plotting curves and surfaces. From a quick look at you code, you're trying to plot a 2D Gaussian. But I'm not sure, because your second plot seems like you already made it.
Anyway, if your problem really is a 2D Gaussian, an easy way is to create a matrix of the radial coordinates.
Take a look at the documentation of meshgrid. That should give you enough inspiration to solve your problem.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by