#include "iostream.h" #include "iomanip.h" #define N 20 //學習樣本個數 #define IN 1 //輸入層神經元數目 #define HN 8 //隱層神經元數目 #define ON 1 //輸出層神經元數目 double P[IN] //單個樣本輸入數據 double T[ON] //單個樣本教師數據 double W[HN][IN] //輸入層至隱層權值 double V[ON][HN] //隱層至輸出層權值 double X[HN] //隱層的輸入 double Y[ON] //輸出層的輸入 double H[HN] //隱層的輸出
標簽: define include iostream iomanip
上傳時間: 2014-01-01
上傳用戶:凌云御清風
La designaci貿n Modbus Modicon corresponde a una marca registrada por Gould Inc. Como en tantos otros casos, la designaci貿n no corresponde propiamente al est謾ndar de red, incluyendo todos los aspectos desde el nivel f鉚sico hasta el de aplicaci貿n, sino a un protocolo de enlace [nivel OSI 2]. Puede, por tanto, implementarse con diversos tipos de conexi貿n f鉚sica y cada fabricante suele suministrar un software de aplicaci貿n propio, que permite parametrizar sus producto
標簽: corresponde registrada designaci Modicon
上傳時間: 2014-12-01
上傳用戶:梧桐
1. 在No.1圖形窗口中繪制 y=sin(x)在[0,2*pi]內的曲線。要求曲線的顏色為綠色,線型為 點劃線,用*標示坐標點,在x軸的附近用 黑體 標注 ‘x軸’字樣,在圖形的上方加上標題 ‘正弦函數’,嚴格控制x,y軸分度相等,并開啟網格。 2. 在No.2圖形窗口中創建四個子窗口,在第一、二子窗口中用不同的方法同時繪制 y=x^2,y=-x^2,y=x^2*sin(x) 在[0,2*pi]內的曲線,并要給出標注 在第三個子窗口中繪制 三維曲線 3. 把No.3圖形窗口分成五個子窗口,分別用plot3 mesh meshc meshz surf 來繪制 z=x*exp(-x^2-y^2) 在 -5=<x,y<=5 內的空間曲面圖形,說明他們的區別,其中要求在用surf繪制的窗口內加入位置為[1,0.5,2]的光源,加入顏色標尺,采用spring色系
上傳時間: 2017-03-30
上傳用戶:84425894
樹是由n(n≥0)個結點組成的有限集合T。n=0的樹稱為空樹;對n>0的樹,有:(1)僅有一個特殊的結點稱為根結點,根結點沒有前驅結點;(2)當n>1時,除根結點外其余的結點分為m(m>0)個互不相交的有限集合T1,T2,…,Tm,其中每個集合Ti本身又是一棵結構和樹類似的子樹。
上傳時間: 2014-01-01
上傳用戶:lgnf
最長上升子序列 非常經典的問題。 給定的整數序列,請求出其最長上升子序列的長度。 有多個測試用例。每個測試用例由一個行整數組成,其中第一個是一個整數 n (1 ≤ n ≤ 10000),表示給定序列的長度。然后是 n 個 32-bits 帶符號整數表示序列中的元素。 輸入直至沒有數據或者遇到長度 n 是非正數為止。
上傳時間: 2014-01-04
上傳用戶:稀世之寶039
離散卷積計算 實驗步驟: 主界面下進入實驗五的“離散卷積計算”子實驗, 輸入有限長序列 x(n) 輸入有限長序列 h(n) 鼠標單擊確定按鈕,以數值和圖形兩種方式顯示卷積結果
上傳時間: 2013-12-17
上傳用戶:zhaiye
DFT 計算 實驗步驟: 主界面下進入實驗九的“DFT計算”的子實驗。 輸入取樣點數,即有限長序列 x(n) 的長度。 輸入信號表達式,或直接輸入離散序列。 鼠標單擊確定按鈕,顯示原序列及 DFT 系數的幅度、相位。
上傳時間: 2017-07-24
上傳用戶:kr770906
%========================開始提取加噪信號的各類特征值================================ for n=1:1:50; m=n*Ns; x=(n-1)*Ns; for i=x+1:m; %提取加噪信號'signal_with_noise=y+noise'的前256個元素,抽取50次 y0(i)=signal_with_noise(i); end Y=fft(y0); %對調制信號進行快速傅里葉算法(離散) y1=hilbert(y0) ; %調制信號實部的解析式 factor=0; %開始求零中心歸一化瞬時幅度譜密度的最大值gamma_max for i=x+1:m; factor=factor+y0(i); end ms=factor/(m-x); an_i=y0./ms; acn_i=an_i-1; end gamma_max=max(fft(acn_i.*acn_i))/Ns
上傳時間: 2020-04-07
上傳用戶:如拷貝般復制
#include<stdio.h> #define TREEMAX 100 typedef struct BT { char data; BT *lchild; BT *rchild; }BT; BT *CreateTree(); void Preorder(BT *T); void Postorder(BT *T); void Inorder(BT *T); void Leafnum(BT *T); void Nodenum(BT *T); int TreeDepth(BT *T); int count=0; void main() { BT *T=NULL; char ch1,ch2,a; ch1='y'; while(ch1=='y'||ch1=='y') { printf("\n"); printf("\n\t\t 二叉樹子系統"); printf("\n\t\t*****************************************"); printf("\n\t\t 1---------建二叉樹 "); printf("\n\t\t 2---------先序遍歷 "); printf("\n\t\t 3---------中序遍歷 "); printf("\n\t\t 4---------后序遍歷 "); printf("\n\t\t 5---------求葉子數 "); printf("\n\t\t 6---------求結點數 "); printf("\n\t\t 7---------求樹深度 "); printf("\n\t\t 0---------返 回 "); printf("\n\t\t*****************************************"); printf("\n\t\t 請選擇菜單號 (0--7)"); scanf("%c",&ch2); getchar(); printf("\n"); switch(ch2) { case'1': printf("\n\t\t請按先序序列輸入二叉樹的結點:\n"); printf("\n\t\t說明:輸入結點(‘0’代表后繼結點為空)后按回車。\n"); printf("\n\t\t請輸入根結點:"); T=CreateTree(); printf("\n\t\t二叉樹成功建立!\n");break; case'2': printf("\n\t\t該二叉樹的先序遍歷序列為:"); Preorder(T);break; case'3': printf("\n\t\t該二叉樹的中序遍歷序列為:"); Inorder(T);break; case'4': printf("\n\t\t該二叉樹的后序遍歷序列為:"); Postorder(T);break; case'5': count=0;Leafnum(T); printf("\n\t\t該二叉樹有%d個葉子。\n",count);break; case'6': count=0;Nodenum(T); printf("\n\t\t該二叉樹總共有%d個結點。\n",count);break; case'7': printf("\n\t\t該樹的深度為:%d",TreeDepth(T)); break; case'0': ch1='n';break; default: printf("\n\t\t***請注意:輸入有誤!***"); } if(ch2!='0') { printf("\n\n\t\t按【Enter】鍵繼續,按任意鍵返回主菜單!\n"); a=getchar(); if(a!='\xA') { getchar(); ch1='n'; } } } } BT *CreateTree() { BT *t; char x; scanf("%c",&x); getchar(); if(x=='0') t=NULL; else { t=new BT; t->data=x; printf("\n\t\t請輸入%c結點的左子結點:",t->data); t->lchild=CreateTree(); printf("\n\t\t請輸入%c結點的右子結點:",t->data); t->rchild=CreateTree(); } return t; } void Preorder(BT *T) { if(T) { printf("%3c",T->data); Preorder(T->lchild); Preorder(T->rchild); } } void Inorder(BT *T) { if(T) { Inorder(T->lchild); printf("%3c",T->data); Inorder(T->rchild); } } void Postorder(BT *T) { if(T) { Postorder(T->lchild); Postorder(T->rchild); printf("%3c",T->data); } } void Leafnum(BT *T) { if(T) { if(T->lchild==NULL&&T->rchild==NULL) count++; Leafnum(T->lchild); Leafnum(T->rchild); } } void Nodenum(BT *T) { if(T) { count++; Nodenum(T->lchild); Nodenum(T->rchild); } } int TreeDepth(BT *T) { int ldep,rdep; if(T==NULL) return 0; else { ldep=TreeDepth(T->lchild); rdep=TreeDepth(T->rchild); if(ldep>rdep) return ldep+1; else return rdep+1; } }
上傳時間: 2020-06-11
上傳用戶:ccccy
USB子類協議.part2
上傳時間: 2013-05-22
上傳用戶:eeworm