%exemple de trace de fonction de R^2 dans R close all; clear all; clc; nSub=10; xMin=0; xMax=5; yMin=0; yMax=5; xPlot=linspace(xMin,xMax,nSub); yPlot=linspace(xMin,xMax,nSub); [X,Y]=meshgrid(xPlot,yPlot); Z=zeros(nSub,nSub); for i=1:nSub for j=1:1:nSub Z(i,j)=X(i,j); end end figure(1) hold on surf(X,Y,Z); xlabel('axe x'); ylabel('axe y'); grid; hold off