-
x=[1 2 3 4 5 8 7 18]
y=1:7
z=3:2:9
v=[y z]
u=linspace(2,9,11)
http://www.codebf.com/read/16944/703454
-
x=1:9
y=x(2:2:8)
z=[x(1) x(6) x(8)]
http://www.codebf.com/read/16944/703457
-
[x,fval]=fminbnd('fun0',0,1.5);
xmax=x
fmax=-fval
http://www.codebf.com/read/16944/703482
-
[x,y]=meshgrid(-2:0.1:2,-1:0.1:3);
z=100*(y-x.^2).^2+(1-x).^2;
mesh(x,y,z)
http://www.codebf.com/read/16944/703484
-
[x,y]=meshgrid(-2:0.1:2,-1:0.1:3);
z=100*(y-x.^2).^2+(1-x).^2;
contour(x,y,z,20)
hold on
plot(-1.2,2,' o ');
text(-1.2,2,'start point')
plot(1,1,'o')
text
http://www.codebf.com/read/16944/703486
-
x=linspace(-6,6,100);
y=1./(x.^2+1);
x1=linspace(-6,6,41);
y1=1./(x1.^2+1);
plot(x,y,x1,y1,x1,y1,'o','LineWidth',1.5),
gtext('n=40'),
http://www.codebf.com/read/16944/703498
-
x=linspace(-6,6,100);
y=1./(x.^2+1);
x1=linspace(-6,6,11);
y1=1./(x1.^2+1);
plot(x,y,x1,y1,x1,y1,'o','LineWidth',1.5),
gtext('n=10'),
http://www.codebf.com/read/16944/703501
-
x=1:5;
y=1:3;
temps=[82 81 80 82 84;79 63 61 65 81;84 84 82 85 86];
mesh(x,y,temps)
pause
xi=1:0.2:5;
yi=1:0.2:3;
zi=interp2(x,y,temps,xi',yi,'cubic');
figure(2)
mesh(xi,yi,zi)
http://www.codebf.com/read/16944/703504
-
x=linspace(-6,6,100);
y=1./(x.^2+1);
x1=linspace(-6,6,5);
y1=1./(x1.^2+1);
plot(x,y,x1,y1,x1,y1,'o','LineWidth',1.5),
gtext('n=4'),
http://www.codebf.com/read/16944/703505
-
x=linspace(-6,6,100);
y=1./(x.^2+1);
x1=linspace(-6,6,21);
y1=1./(x1.^2+1);
plot(x,y,x1,y1,x1,y1,'o','LineWidth',1.5),
gtext('n=20'),
http://www.codebf.com/read/16944/703508