필터 지우기
필터 지우기

Mesh Plot from Data Points

조회 수: 2 (최근 30일)
Garrett  Skinner
Garrett Skinner 2019년 1월 18일
답변: Naman Chaturvedi 2019년 1월 21일
I am trying to create a 3d mesh plot from data points. The plot i'm trying to create is dose rate in 3d space in a cylindrical coordinate system. I keep getting an error telling me that the size of the matrices are correct. Dose is a 220x35 matrix, r is broken down into 35 steps from 0 to 24, z is broke down into 11 steps from 0 to 24 and theta is from 0 to 1 with 20 steps.
Dose 220x35
r 220x35
z 220x11
theta 220x20
I tried the following:
surf(r,z,theta,dose)
colorbar

답변 (1개)

Naman Chaturvedi
Naman Chaturvedi 2019년 1월 21일
Hi Garret,
To use surf(x,y,z), x, y and z should be matrices of the same size.Also, as you may know, the x, y and z are from the cartesian coordinate system. So, you would have to convert your cylindrical coordinates to cartesian coordinates.
>> surf(R.*cos(PHI), R.*sin(PHI), Z);
Also, go through the surf documentation: https://www.mathworks.com/help/matlab/ref/surf.html

카테고리

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