上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 74 下一页
摘要: clear all;close all;clc;img=imread('lena.jpg');img=im2bw(img,graythresh(img));imshow(img)[height width]=size(img);img_re=zeros(height,width);temp=[];for i=2:height-1 %腐蚀 for j=2:width-1 temp=img(i-1:i+1,j-1:j+1); img_re(i,j)=min(temp(:)); endendfor i=2:height... 阅读全文
posted @ 2012-07-04 22:07 Dsp Tian 阅读(4021) 评论(0) 推荐(1) 编辑
摘要: clear all; close all; clc; n=40; point=load('point.mat'); current_point=point.point; plot(current_point(:,1),current_point(:,2),'r'); %系统方程:x(k+1)=fi* 阅读全文
posted @ 2012-07-04 15:19 Dsp Tian 阅读(11372) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;class Road{public: Road(){} virtual ~Road(){} void operation() { start(); step1(); step2(); step3(); end(); } void start(){cout<<"start"<<endl;} void end(){cout<<"end"<<endl;} virtual void step1()=0; ... 阅读全文
posted @ 2012-06-30 21:23 Dsp Tian 阅读(573) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string>using namespace std;class math{public: math(){} virtual ~math(){} virtual void add()=0;};class ADD1 : public math{public: ADD1(){} virtual ~ADD1(){} void add() { cout<<"the first type of add"<<endl; }};class ADD2 : public math{pub 阅读全文
posted @ 2012-06-30 20:44 Dsp Tian 阅读(510) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string>#include <vector>#include <algorithm>#include <functional>using namespace std;class Observer{public: Observer(){} virtual ~Observer(){} virtual void run()=0;protected: string _name;};class atlete : public Observer{public: atlete(strin 阅读全文
posted @ 2012-06-28 22:37 Dsp Tian 阅读(576) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string>#include <vector>#include <iomanip>using namespace std;class info{public: info():pc(0){} ~info(){} void input(string name,int age,int salary) { _name.push_back(name); _age.push_back(age); _salary.push_back(salary); pc++; ... 阅读全文
posted @ 2012-06-28 20:49 Dsp Tian 阅读(585) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string>using namespace std;class absperson;class absmed{public: absmed(){} virtual ~absmed(){} virtual void send(string,absperson*)=0; virtual void set(absperson*,absperson*)=0;};class absperson{public: absperson(){} virtual ~absperson(){} virtual vo... 阅读全文
posted @ 2012-06-28 15:00 Dsp Tian 阅读(574) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <string>#define CAP 100using namespace std;class group{public: group():pc(0){} virtual ~group(){} friend class Iterator; void push(string m) { if (pc<CAP) vec[pc++]=m; } string pop() { if (!isempty()) return vec[... 阅读全文
posted @ 2012-06-28 12:39 Dsp Tian 阅读(636) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>using namespace std;class action{public: action(){} ~action(){} void forward(){cout<<"forward"<<endl;} void backward(){cout<<"backward"<<endl;}};class command{public: command(){} virtual ~command(){} virtual void execute()=0; virtu 阅读全文
posted @ 2012-06-27 14:03 Dsp Tian 阅读(580) 评论(0) 推荐(0) 编辑
摘要: #include <iostream>#include <vector>using namespace std;class relatives{public: relatives(){} virtual ~relatives(){} virtual bool request(int)=0;};class brother : public relatives{public: brother(){} virtual ~brother(){} bool request(int num) { if (num<100) { ... 阅读全文
posted @ 2012-06-27 12:50 Dsp Tian 阅读(629) 评论(0) 推荐(0) 编辑
上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 74 下一页