随笔分类 -  Matlab

强大的计算平台
摘要:摘要:一个圆环在一个圆周轨迹上滚动,本程序绘制其上一点在平面上留下的轨迹。程序:% 实现一个圆在预定轨迹上滚动,圆上一定点留下的轨迹clc;close all;clear;axis([-4,4,-4,4]);hold on;title('摆线的绘制');% \copyright: zjliu% Author's email:zjliu2001@163.comset(gcf,'DoubleBuffer','on');axis square;tq=linspace(0,pi*2,200);plot(2*exp(i*tq),'k' 阅读全文
posted @ 2013-01-20 18:47 einyboy 阅读(574) 评论(0) 推荐(0) 编辑
摘要:% for Q1:横坐标轴可否移动位置clc;clear;close all;t=linspace(0,8,100);a1=axes;plot(t,sin(t));xt=get(gca,'xtick');set(gca,'XTick',[],'XColor','w');xL=xlim;p=get(gca,'Position');box off;a2=axes('Position',p+[0,p(4)/2,0,-p(4)/2]);xlim(xL);box off;set(gca,'XTick& 阅读全文
posted @ 2013-01-20 18:40 einyboy 阅读(578) 评论(0) 推荐(0) 编辑
摘要:matlab函数_连通区域1、 matlab函数bwareaopen──删除小面积对象格式:BW2 = bwareaopen(BW,P,conn)作用:删除二值图像BW中面积小于P的对象,默认情况下使用8邻域。算法:(1)Determine the connected components. L = bwlabeln(BW, conn);(2)Compute the area of each component. S = regionprops(L, 'Area');(3)Remove small objects. bw2 = ismember(L, find([S.Area] 阅读全文
posted @ 2012-08-03 16:06 einyboy 阅读(96379) 评论(1) 推荐(7) 编辑
摘要:% Cripple Pachebel's Canon on Matlab% Have funfs = 44100; % sample ratedt = 1/fs;T16 = 0.125;t16 = [0:dt:T16];[temp k] = size(t16);t4 = linspace(0,4*T16,4*k);t8 = linspace(0,2*T16,2*k);[temp i] = size(t4);[temp j] = size(t8);% Modification functionsmod4 = sin(pi*t4/t4(end));mod8 = sin(pi*t8/t8(e 阅读全文
posted @ 2012-06-01 21:27 einyboy 阅读(508) 评论(0) 推荐(0) 编辑