虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

2<b>2</b>1

  • This computes an in-place complex-to-complex FFT x and y are the real and imaginary arrays of 2^m

    This computes an in-place complex-to-complex FFT x and y are the real and imaginary arrays of 2^m points. dir = 1 gives forward transform dir = -1 gives reverse transform

    标签: complex-to-complex and imaginary computes

    上传时间: 2013-12-18

    上传用户:huql11633

  • function [U,center,result,w,obj_fcn]= fenlei(data) [data_n,in_n] = size(data) m= 2 % Exponent fo

    function [U,center,result,w,obj_fcn]= fenlei(data) [data_n,in_n] = size(data) m= 2 % Exponent for U max_iter = 100 % Max. iteration min_impro =1e-5 % Min. improvement c=3 [center, U, obj_fcn] = fcm(data, c) for i=1:max_iter if F(U)>0.98 break else w_new=eye(in_n,in_n) center1=sum(center)/c a=center1(1)./center1 deta=center-center1(ones(c,1),:) w=sqrt(sum(deta.^2)).*a for j=1:in_n w_new(j,j)=w(j) end data1=data*w_new [center, U, obj_fcn] = fcm(data1, c) center=center./w(ones(c,1),:) obj_fcn=obj_fcn/sum(w.^2) end end display(i) result=zeros(1,data_n) U_=max(U) for i=1:data_n for j=1:c if U(j,i)==U_(i) result(i)=j continue end end end

    标签: data function Exponent obj_fcn

    上传时间: 2013-12-18

    上传用户:ynzfm

  • *** *** *** *** *** *** ***** ** Two wire/I2C Bus READ/WRITE Sample Routines of Microchip s ** 2

    *** *** *** *** *** *** ***** ** Two wire/I2C Bus READ/WRITE Sample Routines of Microchip s ** 24Cxx / 85Cxx serial CMOS EEPROM interfacing to a ** PIC16C54 8-bit CMOS single chip microcomputer ** Revsied Version 2.0 (4/2/92). ** ** Part use = PIC16C54-XT/JW ** Note: 1) All timings are based on a reference crystal frequency of 2MHz ** which is equivalent to an instruction cycle time of 2 usec. ** 2) Address and literal values are read in octal unless otherwise ** specified.

    标签: Microchip Routines Sample WRITE

    上传时间: 2013-12-27

    上传用户:ljmwh2000

  • 维吉尼亚算法的实现

    维吉尼亚算法的实现,构成 明文:每个字符惟一对应一个0~25间的数字。 密钥:一个字符串,其中每个字符同明文一样对应一个数字,代表位移值,如a 表示位移 0,b 表示位移 1,c 表示位移 2,...... )。 加密过程: 将明文数字串依据密钥长度分段,并逐一与密钥数字串相加(模26),得到密文数字串; 最后,将密文数字串转换为字母串。

    标签: 算法

    上传时间: 2016-12-27

    上传用户:ommshaggar

  • 本题要完成的是一组简单C表达的运算。所有表达式存放在文件 CExpression.txt 中

    本题要完成的是一组简单C表达的运算。所有表达式存放在文件 CExpression.txt 中,每个表达式一行。每行的长度不会超过80个字符。文件最后有一个空行表示结束。 每个表达式,只包含简单的整数变量和限定的一些操作符,表达式中没有常量。总共有26个可能出现在表达式中的变量,分别命名为 a,b,...,z。每个变量最多出现一次。26个变量的初值分别为1,2,...,26。 表达式中的操作符,包括:两个二元操作符 +, -,表示加,减运算。例如,表达式a+c-d+b(即1+3-4+2)的结果为2。 单独一个-号不能放在变量前面,表示负数。 表达式中还包含两个一元运算符:++,--,表示加一和减一运算。它们既可以出现在一个变量的前面、也可以出现在后面。如果出现在变量前面,则表示先对变量进行加一/减一运算,然后变量值参与表达式计算。如果出现在变量后面,则表示变量的原值参与表达式计算,表达式计算完之后,变量值加一/减一。 例如,表达式 -- c + b-- 的结果为 4, 表达式计算完之后, b,c的值分别为1,2 输出格式要求:输出直接显示在屏幕上。对于每个表达式,第一行输出表达式的内容。第二行输出表达式的值,后面几行输出参与运算的各个变量的结果值。

    标签: CExpression txt 运算 表达式

    上传时间: 2017-01-17

    上传用户:cjf0304

  • VB遥控播放器红外遥控解码 #include <regX52.h> #define c(x) (x*110592/120000) sbit Ir_Pin=P3^2 sb

    VB遥控播放器红外遥控解码 #include <regX52.h> #define c(x) (x*110592/120000) sbit Ir_Pin=P3^2 sbit beep=P2^1 //sbit RELAY=P2^0 #define INBUF_LEN 4 //数据长度 unsigned char inbuf1[INBUF_LEN]={ 0 , 0 , 0 , 0 } //发送缓冲区 unsigned char inbuf2[50] //接收缓冲区 unsigned char count3 void init_serialcomm( void ) { SCON = 0x50 //SCON: serail mode 1, 8-bit UART, enable ucvr T2CON=0x30 TH2=0x00 TL2=0x00 RCAP2H=0xFF RCAP2L=0xDC TR2=1 } //向串口发送一个字符 void send_char_com( unsigned char ch) { SBUF=ch while (TI== 0 ) TI= 0

    标签: include 110592 120000 define

    上传时间: 2013-12-21

    上传用户:yph853211

  • Instead of finding the longest common subsequence, let us try to determine the length of the LCS.

    Instead of finding the longest common subsequence, let us try to determine the length of the LCS. 􀂄 Then tracking back to find the LCS. 􀂄 Consider a1a2…am and b1b2…bn. 􀂄 Case 1: am=bn. The LCS must contain am, we have to find the LCS of a1a2…am-1 and b1b2…bn-1. 􀂄 Case 2: am≠bn. Wehave to find the LCS of a1a2…am-1 and b1b2…bn, and a1a2…am and b b b b1b2…bn-1 Let A = a1 a2 … am and B = b1 b2 … bn 􀂄 Let Li j denote the length of the longest i,g g common subsequence of a1 a2 … ai and b1 b2 … bj. 􀂄 Li,j = Li-1,j-1 + 1 if ai=bj max{ L L } a≠b i-1,j, i,j-1 if ai≠j L0,0 = L0,j = Li,0 = 0 for 1≤i≤m, 1≤j≤n.

    标签: the subsequence determine Instead

    上传时间: 2013-12-17

    上传用户:evil

  • 工业领域串口通信速度慢是个比较突出的问题

    工业领域串口通信速度慢是个比较突出的问题, 而 F T 2 4 5 B M 能够进行 US B和并行 I / O口之间的 协议转换, 在一些条件下能够取代串口. 介绍 F T 2 4 5 B M 芯片的工作原理和功能, 并给出基于 F T2 4 5 B M 的 US B接口电路的应用设计和基于 8 9 c 5 2的汇编及 c 5 1 单片机源程序.

    标签: 工业领域 串口通信 速度 比较

    上传时间: 2017-05-27

    上传用户:kytqcool

  • 本代码为编码开关代码

    本代码为编码开关代码,编码开关也就是数字音响中的 360度旋转的数字音量以及显示器上用的(单键飞梭开 关)等类似鼠标滚轮的手动计数输入设备。 我使用的编码开关为5个引脚的,其中2个引脚为按下 转轮开关(也就相当于鼠标中键)。另外3个引脚用来 检测旋转方向以及旋转步数的检测端。引脚分别为a,b,c b接地a,c分别接到P2.0和P2.1口并分别接两个10K上拉 电阻,并且a,c需要分别对地接一个104的电容,否则 因为编码开关的触点抖动会引起轻微误动作。本程序不 使用定时器,不占用中断,不使用延时代码,并对每个 细分步数进行判断,避免一切误动作,性能超级稳定。 我使用的编码器是APLS的EC11B可以参照附件的时序图 编码器控制流水灯最能说明问题,下面是以一段流水 灯来演示。

    标签: 代码 编码开关

    上传时间: 2017-07-03

    上传用户:gaojiao1999

  • 【问题描述】 在一个N*N的点阵中

    【问题描述】 在一个N*N的点阵中,如N=4,你现在站在(1,1),出口在(4,4)。你可以通过上、下、左、右四种移动方法,在迷宫内行走,但是同一个位置不可以访问两次,亦不可以越界。表格最上面的一行加黑数字A[1..4]分别表示迷宫第I列中需要访问并仅可以访问的格子数。右边一行加下划线数字B[1..4]则表示迷宫第I行需要访问并仅可以访问的格子数。如图中带括号红色数字就是一条符合条件的路线。 给定N,A[1..N] B[1..N]。输出一条符合条件的路线,若无解,输出NO ANSWER。(使用U,D,L,R分别表示上、下、左、右。) 2 2 1 2 (4,4) 1 (2,3) (3,3) (4,3) 3 (1,2) (2,2) 2 (1,1) 1 【输入格式】 第一行是数m (n < 6 )。第二行有n个数,表示a[1]..a[n]。第三行有n个数,表示b[1]..b[n]。 【输出格式】 仅有一行。若有解则输出一条可行路线,否则输出“NO ANSWER”。

    标签: 点阵

    上传时间: 2014-06-21

    上传用户:llandlu