随笔分类 - MATLAB
1
摘要:遗传算法概述: • 遗传算法(Genetic Algorithm,GA)是一种进化算法,其基本原理是仿效生物界中的“物竞天择、适者生存”的演化法则,它最初由美国Michigan大学的J. Holland教授于1967年提出。• 遗传算法是从代表问题可能潜在的解集的一个种群(population)开始
阅读全文
摘要:人工神经网络概述: 人工神经元模型: 神经网络的分类: 按照连接方式,可以分为:前向神经网络 vs. 反馈(递归)神经网络; 按照学习方式,可以分为:有导师学习神经网络 vs. 无导师学习神经网络; 按照实现功能,可以分为:拟合(回归)神经网络 vs. 分类神经网络。 数据归一化:将数据映射到[0,
阅读全文
摘要:矩阵块操作: 矩阵尺寸改变: 矩阵的查找: 矩阵的排序: 矩阵求和: 矩阵的求积: 矩阵的差分: 全零矩阵: 单位矩阵: 随机矩阵: 伴随矩阵: 方针行列式计算: 特征值: 对角矩阵: 三角矩阵: 矩阵求逆:
阅读全文
摘要:1 function varargout = GUI20(varargin) 2 % GUI20 MATLAB code for GUI20.fig 3 % GUI20, by itself, creates a new GUI20 or raises the existing 4 % single
阅读全文
摘要:1 function varargout = GUI19(varargin) 2 % GUI19 MATLAB code for GUI19.fig 3 % GUI19, by itself, creates a new GUI19 or raises the existing 4 % single
阅读全文
摘要:1 function varargout = GUI18(varargin) 2 % GUI18 MATLAB code for GUI18.fig 3 % GUI18, by itself, creates a new GUI18 or raises the existing 4 % single
阅读全文
摘要:1 %带有右键菜单的GUI 2 figure('Menubar','none'); 3 h = uicontextmenu; 4 uimenu(h,'Label','A'); 5 uimenu(h,'Label','B'); 6 set(gcf,'Uicontextmenu',h); 7 8 %获得
阅读全文
摘要:1 function varargout = GUI013(varargin) 2 % GUI013 MATLAB code for GUI013.fig 3 % GUI013, by itself, creates a new GUI013 or raises the existing 4 % s
阅读全文
摘要:输入对话框: 留言对话框: 目录对话框: 列表对话框:
阅读全文
摘要:%普通对话框 dialog %单击时会关闭当前窗口 %自定义 关于对话框 点击确定 关闭 h = dialog('name','关于...','Position',[200 200 200 70]); uicontrol('parent', h , 'Style','pushbutton','Pos
阅读全文
摘要:1 %进度条 2 %waitbar 3 h=waitbar(0,'实例'); 4 get(h); 5 6 %获得进度条的子对象 7 get(get(h,'Children')) 8 9 ha=get(h,'Children'); 10 11 %获得坐标轴子对象内容 12 %get(ha,'Child
阅读全文
摘要:1 %颜色设置对话框 2 uisetcolor 3 4 %c 1 0 0 红色 5 c=uisetcolor 6 7 %默认规定颜色 8 c=uisetcolor([1 0 0 ]); 9 10 %设置曲线颜色 11 h = plot([0:10]); 12 c = uisetcolor(h); 13 14 %生成一个按钮 点击弹出改变颜色的对话框 选定颜色改变按钮的颜...
阅读全文
摘要:1 %uigetfile 2 uigetfile 3 4 doc uigetfile 5 6 %规定打开文件类型 7 uigetfile('*.m'); 8 9 %输出参数意义 10 [a,b,c] = uigetfile('*.m');%a 文件名 b 位置 c 保存键or取消键 11 12 [a,b,c] = uigetfile('*.txt'); 13 load(...
阅读全文
摘要:1 %text 2 hf = axes; 3 ht = text(1,1,'示例'); 4 5 get(ht); 6 7 %公式 并且设置位置坐标 (积分符号) 8 text('String','\int_0^x dF(x)','Position',[0.5 0.5]); 9 10 text('interpreter','latex','String', '$$ \int...
阅读全文
摘要:1 %示意line对象的用法 2 hf=figure; 3 hl=plot([0:10]); 4 5 %示意line对象的属性 6 get(hl) 7 8 %设置line的颜色 9 set(hl,'Color','r'); 10 11 %设置每个点形状 12 set(hl,'Marker','p'); 13 14 %设置颜色 15 set(hl,'MarkerEdgeC...
阅读全文
摘要:1 %常用对象的属性 2 3 %1.figure 4 %hf=figure; 5 %get(hf); 6 7 %改变颜色 set Color 8 %set(hf,'Color','w'); 9 10 %去掉默认的菜单 Menubar 11 %set(hf,'Menubar','none'); 12 13 %设置名字 14 %set(hf,'NumberTitle',...
阅读全文
摘要:1 %--------------------符号变/常量------------------- 2 3 %符号变量sym syms 4 a=sym('a'); 5 syms b; 6 7 %符号常量sym syms 8 c=sym('3'); 9 10 f1='3 * x + 4'; 11 12 syms x; 13 f2=3 * x ...
阅读全文
摘要:1 %底层代码创建GUI 2 3 hf = figure(... 4 'Units','Normalized',... 5 'Color','w',... 6 'Position',[0.1 0.1 0.8 0.8]); 7 8 ha=axes(... 9 'Parent',hf,... 10 'U
阅读全文
摘要:(1)二进制图 在二进制图中,像素的取值为两个离散数值0或1中的一个,0代表黑色,1代表白色 例 A=[0 0 1;1 1 0; 0 0 1];>> imshow(A,'InitialMagnification','fit') %调整合适的窗口显示A。 (2)索引图 索引图像包括一个数据矩阵X,一个
阅读全文
1