【模式识别】为大作业准备的第1周

matlab基础学习,复现模式识别课程要求的顶级论文。 

% a=10;
% a=100;
% b=1;
% if (a>b)
%     max=a;
% else
%     max=b;
% end

% x=1:0.1:10;在域1到10之间绘制sin函数
% y=sin(x);
% plot(x,y),grid on
% a=19;显示输出函数disp
% disp(a);
% b=10;
% str=sprintf('b=%0.5f',b);
% disp(str);
% disp('hello world');

% x = -100:2:100;
% y = x.^2;
% plot(x, y),grid on

% x = 0:0.01:10;
% y = sin(x);
% plot(x, y), xlabel('x'), ylabel('Sin(x)'), title('Sin(x) Graph'),
% grid on, axis equal

% x=0:0.1:10;
% y=sin(x);
% g=cos(x);
% plot(x,y,'r',x,g,'g'),legend('sin(x)','cos(x)')

% x=-10:0.1:10;
% y=3*x.^4+2*x.^3+7*x.^2+2*x+9;
% g=5*x.^3+9*x+2;
% plot(x,y,'g',x,g,'r'),grid on

% x=0:0.01:10;
% y=exp(-x).*sin(2*x+3);
% plot(x,y),axis([0 10 -1 1]),grid on
% set(gca,'xtick',0:0.5:10) %更改x轴网格间隔

% x=0:0.1:5;
% y=exp(-1.5*x).*sin(10*x);
% subplot(1,2,1)
% plot(x,y),xlabel('x'),ylabel('y=exp(-1.5*x).*sin(10*x)'),axis([0 5 -1 1])
% y=exp(-2*x).*sin(10*x);
% subplot(1,2,2);
% plot(x,y),xlabel('x'),ylabel('y=exp(-2*x).*sin(10*x)'),axis([0 5 -1 1])

% syms x;
% % en=x^2==100;
% en=x^2-3*x+2==0;
% s=solve(en,x);
% disp(s);
% disp('第二种');
% disp(s(1));
% disp(s(2));

% syms x
% limit((x^3 + 5)/(x^4 + 7))x趋近0

% syms x
% limit((x-3)/(x-1),1)x趋近1

猜你喜欢

转载自blog.csdn.net/weixin_41865104/article/details/108672333