Welcome![Sign In][Sign Up]
Location:
Search - TI

Search list

[Communication-Mobiletms320c5000资料.rar

Description: DSP资料—— TI公司的TMS320C5000
Platform: | Size: 8144125 | Author: | Hits:

[Communication-Mobiletrans92-1.0.src.tar.gz

Description: program to trasmit data to a TI92 with the TI Graph-Link
Platform: | Size: 21449 | Author: | Hits:

[VOIP programmelp_fixed.zip

Description: TI/ASPI MELP压缩算法
Platform: | Size: 762144 | Author: | Hits:

[Streaming Mpeg4h263.zip

Description: 基于H.263的图像压缩编解码的C源码,在CPU为586以上的PC上能够实时完成压缩、解压缩算法,并可以很容易地移植到TI的DSP上
Platform: | Size: 167785 | Author: | Hits:

[Other用c编写的N*N的螺旋矩阵源代码

Description:

/*
实现效果:
1 2 6 7 15
3 5 8 14 16
4 9 13 17 22
10 12 18 21 23
11 19 20 24 25
*/
#include <stdio.h>
#define N 5 //阶数,即N*N的螺旋矩阵

void main()
{
    int i, j, num=1, a[N][N];
    for(i=0; i<=N/2; i++)
    {
        for(j=i; j<N-i; j++) a[i][j]=n++;
        for(j=i+1; j<N-i; j++) a[j][N-i-1]=n++;
        for(j=N-i-2; j>i; j--) a[N-i-1][j]=n++;
        for(j=N-i-1; j>i; j--) a[j][i]=n++;
    }
    for(i=0; i<N; i++)
    {
        for(j=0; j<N; j++)
            printf("%2d ",a[i][j]);
        printf("\n");
    }
}
    

 

不知道叫什么,先叫它“回宫图”吧
年初的时候在贴吧瞎逛,看到了一个程序挺有意思,会输出如下的形状:
01 24 23 22 21 20 19
02 25 40 39 38 37 18
03 26 41 48 47 36 17
04 27 42 49 46 35 16
05 28 43 44 45 34 15
06 29 30 31 32 33 14
07 08 09 10 11 12 13
仔细看这个形状,数字是按顺序往里回旋的,觉得很有创意,可是一看源代码头就大了,
每个编程人都知道看别人的代码是很困难的,尤其像这种不知道思路的,所以也就放下
没管了。
昨天上物理课实在是没心思听,就想起这个程序,想了一节课,果然不负有心人,给弄出来了,这个是增强版的,可以输入1-10中的任意个数,然后生成图形。
先看代码,没有注释,所以不好看的懂。
#include<stdio.h>
main()
{
       int n,m,i,j,t,k=1;
       int a[11][11];
       clrscr();
       do{
       printf("please input a number(1-10):");
       scanf("%d",&n);
       }while(n<1||n>10);
       t=n+1;
       for(m=1;m<=t/2;m++)
         {
           for(i=m;i<=t-m;i++)
             {a[i][m]=k;k++;}
           for(j=m+1;j<=t-m;j++)
             {a[i-1][j]=k;k++;}
           for(i=n-m;i>=m;i--)
             {a[i][j-1]=k;k++;}
           for(j=n-m;j>=m+1;j--)
             {a[i+1][j]=k;k++;}
         }
       for(i=1;i<=n;i++)
         {
           for(j=1;j<=n;j++)
             {
               if(a[i][j]<=9) printf("0%d ",a[i][j]);
               else printf("%d ",a[i][j]);       }
           printf("\n");
         }
       getch();
}
就是这样的。


可以更简洁些:

#include<stdio.h>
main()
{
       int n,m,i,j,t,k=1;
       int a[11][11];
       clrscr();
       do{
       printf("please input a number(1-10):");
       scanf("%d",&n);
       }while(n<1||n>10);
       t=n+1;
       for(m=1;m<=t/2;m++)
         {
           for(i=m;i<=t-m;i++)
             a[i][m]=k++;
           for(j=m+1;j<=t-m;j++)
             a[i-1][j]=k++;
           for(i=n-m;i>=m;i--)
             a[i][j-1]=k++;
           for(j=n-m;j>=m+1;j--)
             a[i+1][j]=k++;
         }
       for(i=1;i<=n;i++)
         {
           for(j=1;j<=n;j++)
             {
               if(a[i][j]<=9) printf("0%d ",a[i][j]);
               else printf("%d ",a[i][j]);       }
           printf("\n");
         }
       getch();
}

 


 #include <stdio.h>
#define N 8
main(){
 int i,j,n=1,a[N][N];
 for(i=0;i<=N/2;i++){
  for(j=i;j<N-i;j++)
   a[i][j]=n++;
  for(j=i+1;j<N-i;j++)
   a[j][N-i-1]=n++;
  for(j=N-i-2;j>i;j--)
   a[N-i-1][j]=n++;
  for(j=N-i-1;j>i;j--)
   a[j][i]=n++;
 }
 for(i=0;i<N;i++){
  printf("\n\n");
  for(j=0;j<N;j++)
   printf("%5d",a[i][j]);
 }
}
 

 


                                马踏棋盘问题


#include <stdio.h>
#define N 5
void main(){
 int x,y;
 void horse(int i,int j);
 printf("Please input start position:");
 scanf("%d%d",&x,&y);
 horse(x-1,y-1);
}
void horse(int i,int j){
 int a[N][N]={0},start=0,
  h[]={1,2,2,1,-1,-2,-2,-1},
  v[]={2,1,-1,-2,2,1,-1,-2},
  save[N*N]={0},posnum=0,ti,tj,count=0;
 int jump(int i,int j,int a[N][N]);
 void outplan(int a[N][N]);
 a[i][j]=posnum+1;
 while(posnum>=0){
  ti=i;tj=j;
  for(start=save[posnum];start<8;++start){
   ti+=h[start];tj+=v[start];
   if(jump(ti,tj,a))
    break;
   ti-=h[start];tj-=v[start];
  }
  if(start<8){
   save[posnum]=start;
   a[ti][tj]=++posnum+1;
   i=ti;j=tj;save[posnum]=0;
   if(posnum==N*N-1){
    //outplan(a);
    count++;
   }
  }
  else{
   a[i][j]=0;
   posnum--;
   i-=h[save[posnum>;j-=v[save[posnum>;
   save[posnum]++;
  }
 }
 printf("%5d",count);
}
int jump(int i,int j,int a[N][N]){
 if(i<N&&i>=0&&j<N&&j>=0&&a[i][j]==0)
  return 1;
 return 0;
}
void outplan(int a[N][N]){
 int i,j;
 for(i=0;i<N;i++){
  for(j=0;j<N;j++)
   printf("%3d",a[i][j]);
  printf("\n");
 }
 printf("\n");
 //getchar();
}
用回溯法得到所有的解,但效率较低,只能算出5行5列的

 


Platform: | Size: 4395 | Author: good@588 | Hits:

[Other resourceDSP_BIOS

Description: 这是TI DSP开发软件CCS开发工具中特有的内部操作系统的使用说明,这是使用CCS的关键-This is the TI DSP software development tools CCS unique internal system usage, This is the key to the use of CCS
Platform: | Size: 1352074 | Author: 白冰 | Hits:

[Other resourceucos port forf240

Description: uC/OS-II 在TI TMS320C240上的移植代码-Phone / OS-II in TI's TMS320C240 transplant code
Platform: | Size: 154723 | Author: 汪新宏 | Hits:

[Other resourceLCD25f57

Description: 使用TI的DSP2407驱动液晶25F57lcd-using the TI DSP2407 to drive the lcd 25F57lcd
Platform: | Size: 8373 | Author: 柳永爱 | Hits:

[WEB Codespru615

Description: TI DSP的最新芯片DM642的规范文档。从事DSP芯片开发必看之。-document for ti s latest chip. dsp developer s handbook.
Platform: | Size: 464148 | Author: 天天 | Hits:

[Voice Compressspra063

Description: TI 的回声抵消编程 Guide,详细介绍了 echo cancellation 的流程 并附有 C 编写的源代码-TI s echo cancel pragramming guide, it introduced the flow of echo cancellation in detail and also attached with the source code written in c.
Platform: | Size: 172126 | Author: 漠之鹰 | Hits:

[DSP programTMDXCNCD28388D

Description: TI 官方TMS320F28388D F28388D controlCARD evaluation module 开发板原理图 PCB,Altium Designer格式,BOM表等,PCB是3D的。(TI official tms320f28388d f28388d control card evaluation module development board schematic PCB, Altium designer format, BOM, etc., PCB is 3D.)
Platform: | Size: 5926912 | Author: zheGao | Hits:

[Othersolar

Description: TI官方例程,单相光伏并网逆变器,含有锁相环,电流闭环,spwm调制等(TI official routine, single-phase photovoltaic grid connected inverter, including phase-locked loop, current closed loop, SPWM modulation, etc)
Platform: | Size: 70656 | Author: ghgsg | Hits:

[Otherfdc2214中文

Description: FDC2214 ti公司芯片 电容传感器 中文资料 包含引脚 寄存器说明(Chip Capacitance Sensor Chinese Data Containing Pin Register Description)
Platform: | Size: 6515712 | Author: asdf09 | Hits:

[hardware designTexas Instruments

Description: Texas Instruments常用元件库 TI Analog Timer Circuit.IntLib TI Logic Flip-Flop.IntLib TI Logic Gate 1.IntLib TI Logic Gate 2.IntLib TI Logic Latch.IntLib TI Logic Switch.IntLib TI Power Mgt Voltage Reference.IntLib TI Power Mgt Voltage Regulator.IntLib Texas Instruments Footprints.PcbLib等等(Texas Instruments TI Analog Timer Circuit.IntLib TI Logic Flip-Flop.IntLib TI Logic Gate 1.IntLib TI Logic Gate 2.IntLib TI Logic Latch.IntLib TI Logic Switch.IntLib TI Power Mgt Voltage Reference.IntLib TI Power Mgt Voltage Regulator.IntLib Texas Instruments Footprints.PcbLib)
Platform: | Size: 18945024 | Author: blue sky1954 | Hits:

[Othersputtering(C-Ti)

Description: 这是一个lammps示例,内容是Ti原子在金刚石基材上的溅射过程。包括了用python写的用于生成Ti原子初始能量的脚本,lammps的输入脚本使用了官方提供的Pylammps接口来。具体的过程见readme文件夹中的readme.md(This is an example of lammps in which Ti atoms are sputtered on a diamond substrate. The script written in Python is used to generate the initial energy of Ti atom. The input script of lammps uses the official pylammps interface. For details, see the readme.md)
Platform: | Size: 7866368 | Author: chdr | Hits:

[Other resource5500 câu Tiếng nhật dành cho mọi người

Description: 5500 câu Tiếng nhật dành cho mọi người.
Platform: | Size: 11606295 | Author: tonynguyen | Hits:

[DocumentsCùng nhau học tiếng Nhật

Description: Cùng nhau học tiếng Nhật
Platform: | Size: 5931823 | Author: tonynguyen | Hits:

[Other resourceTiếng nhật dành cho mọi người

Description: Tiếng nhật dành cho mọi người
Platform: | Size: 6864842 | Author: tonynguyen | Hits:

[Books5500 câu giao tiếp tiếng Nhật trong sinh hoạt hàng ngày (1).zip

Description: 5500 câu giao tiếp tiếng Nhật trong sinh hoạt hàng ngày (1).zip
Platform: | Size: 11606303 | Author: tonynguyen | Hits:

[Program docTI-电量计外围电路设计指导

Description: TI 电量计在消费和工业市场电池产品广泛应用。本文围绕电量计的功能逐一介绍电量计供电和 采样、对外交互、电池保护、电池均衡等外围电路设计,以帮助大家优化电量计电路设计、提高 开发效率
Platform: | Size: 1224488 | Author: 17158473********* | Hits:
« 1 2 ... 44 45 46 47 48 4950 »

CodeBus www.codebus.net