0
안녕하세요 저는 플롯 할 함수 f : [0,1]^2 -> R^2가 있습니다. f (x, y) = ((x + 1)/y, - (x + 1)/y). 나는 2 * N 그리드 라인과 (M + 1) 그리드 포인트로 구성된 [0,1]^2에 등거리 그리드를 만들어야한다.그리드의 2D 함수 플로팅
하지만 2 차원 기능을 수행하는 방법을 모르겠습니다. 나는 1D의 기능을 수행 할 수 있습니다
% Generate equidistant grid on [0,1] and plot grid points
M=25; %number of internal grid points
xgrid = linspace(0,1,M+1)';
null = zeros(size(xgrid));
plot(xgrid,null,'.','MarkerSize',15)
% Sample function at the grid points and plot samples
ysample = xgrid+1;
plot(xgrid,ysample,'r.','MarkerSize',15);
title('Sampling a function on the grid')
hold off
사람이 어떻게 2 차원 함수 f 위해 그것을 말해 수 : [0,1] -> R^2?