Peng Lv

毋意,毋必,毋固,毋我。 言必行,行必果。

导航

[Keep Updating] Matlab Notes

# select a rectangle from an frame

[l r t b ] = select(iFrame);

# import data from a data file

info = importdata('info.txt')

# Read image to a Cell struct

for i = 1:N
  F{i} = imread(img_i);
end

# Create an struct/class

st = struct('name','lp','id',7,'age',22);

# use a figure show image

figure(1),imshow(iFrame);

# Draw 3D map

// use mesh() and surf()
x=-4:0.1:4
y=-5:0.1:5
m = repmat(x,size(x),1);
n = repmat(y,size(y),1);
z = sqrt(m.^2 + n.^2)+eps;
z = sin(z)./z;
mesh(x,y,z);
surf(x,y,z);

# plot several figure in one picture

subplot(m,n,i);
imshow(img_i);

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

#

 

posted on 2012-05-23 15:50  Lvpengms  阅读(277)  评论(0编辑  收藏  举报