vhslice

Plots 2D data sets in a 3D co-ordinate system.

이 제출물을 팔로우합니다

(This may have been done before ...) These two files plot 2D data sets as vertical or horizontal slices in a 3D coordinate system. It is similar to MATLAB's slice function but requires only 2D data arrays.

The following code creates the example in the screenshot:

% Create data sets
% For the x-y plane
a=randn(100,50);
x=1:50;y=1:100;
% For the x-z plane
b=randn(40,50)+5;
z=1:40;
% For the y-z-plane
c=randn(40,100)-4;
% Plot the slices
hold on
% The horizontal slice at z=1:
h=hslice(x',y,a,1);
% A vertical slice parallel to the x axis at y=1
v1=vslice(x,ones(1,50),z,b);
% A vertical slice parallel to the y-axis at x=1
v2=vslice(ones(1,100),y,z,c);

set(gca,'zdir','reverse')

인용 양식

Ulrich Theune (2026). vhslice (https://kr.mathworks.com/matlabcentral/fileexchange/5772-vhslice), MATLAB Central File Exchange. 검색 날짜: .

카테고리

Help CenterMATLAB Answers에서 2-D and 3-D Plots에 대해 자세히 알아보기

일반 정보

MATLAB 릴리스 호환 정보

  • 모든 릴리스와 호환

플랫폼 호환성

  • Windows
  • macOS
  • Linux
버전 퍼블리시됨 릴리스 정보 Action
1.0.0.0