필터 지우기
필터 지우기

How to draw a three-dimensional function image corresponding to the analytic expression of a given piecewise function image

조회 수: 1 (최근 30일)
How do I draw this image in code

채택된 답변

Torsten
Torsten 2024년 4월 16일
편집: Torsten 2024년 4월 16일
f = @(x,y)(4*y-4*x.*y-2*y.^2).*(y<x).*(x+y<1)+2*(1-x).^2.*(y<x).*(x+y>=1)+(4*y-4*y.^2-2*x.^2).*(y>=x).*(x+y<1)+(2-4*x+4*x.*y-2*y.^2).*(y>=x).*(x+y>=1);
nx = 20;
ny = 40;
x = linspace(0,1,nx);
y = linspace(0,1,ny);
[X,Y] = meshgrid(x,y);
surf(X,Y,f(X,Y))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by