plotting a volume data in x and y plane
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
how can i plot the volume data in just the x and y plane.

채택된 답변
darova
2019년 9월 21일
0 개 추천
Use volumeslice() or contourslice()
댓글 수: 11
Anandu S
2019년 9월 21일
the function is in spherical co-ordinates, so how to use slice?
[x,y,z] = sph2cart(theta1,phi1,r1);
zslice=0;
slice(x,y,z,sinr,[],[],zslice);
To use slice we require the cartesian coordinates and that's where everythng goes wrong.
darova
2019년 9월 21일
Why it goes wrong? You have converted your variables to cartesian
Looks ok for me. Show the whole script
clc;
clear all;
close all;
Am=30;
isd=750;
h=50;
n=3;
R=isd./(2*cosd(30));
ps=((3*sqrt(3)*(R^2))/2)^(-1);
PdB=44;
P=10.^((PdB-30)./10);
K=1;
G0=10^(26/10);
theta3dB=40.*(pi/180);
phi3dB=10.*(pi/180);
phi_tilt=-20.*(pi/180);
theta1=-180:180;
theta1=theta1.*(pi/180);
phi1=-90:90;
phi1=phi1.*(pi/180);
r1=0:350;
[theta phi r]=meshgrid(theta1,phi1,r1);
[u v w]=size(theta);
Nth=randn(u,v,w);
AhdB=-min(12.*(theta./theta3dB).^2,Am);
AvdB=-min(12.*((phi-phi_tilt)./phi3dB).^2,Am);
AdB=-min(-(AhdB+AvdB),Am);
GvdB=-min(12.*((phi_tilt)./phi3dB).^2,Am);
BdB=-min(min(12.*(theta./theta3dB).^2,Am),Am+GvdB);
B=10.^(BdB./10);
Gv=10.^(GvdB./10);
B_1=trapz(theta1,B,2);
B_2=B_1(1,1,1);
Ah1dB=-min(12.*(theta+(2*pi/3)./theta3dB).^2,Am);
Ah2dB=-min(12.*(theta-(2*pi/3)./theta3dB).^2,Am);
A1dB=-min(-(Ah1dB+AvdB),Am);
A2dB=-min(-(Ah2dB+AvdB),Am);
A=10.^(AdB./10);
A1=10.^(A1dB./10);
A2=10.^(A2dB./10);
s1=(3.*Gv.*ps.*((isd-r).^(2-n)).*B_2)./((n-2).*((r.^2+h.^2).^(-n./2)).*A);
s2=(A1+A2)./A;
s3=Nth./(G0.*P.*K.*((r.^2+h.^2).^(-n./2)).*A);
inv_sinr=s1+s2+s3;
sinr=1./(inv_sinr);
[x,y,z] = sph2cart(theta,phi,r);
zslice=0;
slice(x,y,z,sinr,[],[],zslice);
Error using interp3 (line 150)
Input grid is not a valid MESHGRID.
Error in slice (line 103)
vi = interp3(x,y,z,v,xi,yi,zi,method);
Error in analytic (line 70)
slice(x,y,z,sinr,[],[],zslice);
I get this error when I run it.
darova
2019년 9월 22일
Ok i understood. So maybe another way:
- create plane in spherical system coordinates
- make slice in spherical
- convert data to cartesian
See attached script
Anandu S
2019년 9월 23일
Can you please get me a final script for my particular case?
darova
2019년 9월 23일
Just replaced top part with yours (i also reduced number of mesh point, too much of them)
Anandu S
2019년 9월 23일
The output is not correct, might be because of sumthing did.Thanks for the help mate, the plotting part of the script is correct I guess.
darova
2019년 9월 23일
Do you have source formulas for your code? Where are those come from?
Anandu S
2019년 9월 24일
the formula i used can be found in https://ieeexplore.ieee.org/document/7492925/authors#authors
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
참고 항목
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)

