#include "iostream" using namespace std; class Matrix { private: double** A; //矩阵A double *b; //向量b public: int size; Matrix(int ); ~Matrix(); friend double* Dooli(Matrix& ); void Input(); void Disp(); }; Matrix::Matrix(int x) { size=x; //为向量b分配空间并初始化为0 b=new double [x]; for(int j=0;j<x;j++) b[j]=0; //为向量A分配空间并初始化为0 A=new double* [x]; for(int i=0;i<x;i++) A[i]=new double [x]; for(int m=0;m<x;m++) for(int n=0;n<x;n++) A[m][n]=0; } Matrix::~Matrix() { cout<<"正在析构中~~~~"<<endl; delete b; for(int i=0;i<size;i++) delete A[i]; delete A; } void Matrix::Disp() { for(int i=0;i<size;i++) { for(int j=0;j<size;j++) cout<<A[i][j]<<" "; cout<<endl; } } void Matrix::Input() { cout<<"请输入A:"<<endl; for(int i=0;i<size;i++) for(int j=0;j<size;j++){ cout<<"第"<<i+1<<"行"<<"第"<<j+1<<"列:"<<endl; cin>>A[i][j]; } cout<<"请输入b:"<<endl; for(int j=0;j<size;j++){ cout<<"第"<<j+1<<"个:"<<endl; cin>>b[j]; } } double* Dooli(Matrix& A) { double *Xn=new double [A.size]; Matrix L(A.size),U(A.size); //分别求得U,L的第一行与第一列 for(int i=0;i<A.size;i++) U.A[0][i]=A.A[0][i]; for(int j=1;j<A.size;j++) L.A[j][0]=A.A[j][0]/U.A[0][0]; //分别求得U,L的第r行,第r列 double temp1=0,temp2=0; for(int r=1;r<A.size;r++){ //U for(int i=r;i<A.size;i++){ for(int k=0;k<r-1;k++) temp1=temp1+L.A[r][k]*U.A[k][i]; U.A[r][i]=A.A[r][i]-temp1; } //L for(int i=r+1;i<A.size;i++){ for(int k=0;k<r-1;k++) temp2=temp2+L.A[i][k]*U.A[k][r]; L.A[i][r]=(A.A[i][r]-temp2)/U.A[r][r]; } } cout<<"计算U得:"<<endl; U.Disp(); cout<<"计算L的:"<<endl; L.Disp(); double *Y=new double [A.size]; Y[0]=A.b[0]; for(int i=1;i<A.size;i++ ){ double temp3=0; for(int k=0;k<i-1;k++) temp3=temp3+L.A[i][k]*Y[k]; Y[i]=A.b[i]-temp3; } Xn[A.size-1]=Y[A.size-1]/U.A[A.size-1][A.size-1]; for(int i=A.size-1;i>=0;i--){ double temp4=0; for(int k=i+1;k<A.size;k++) temp4=temp4+U.A[i][k]*Xn[k]; Xn[i]=(Y[i]-temp4)/U.A[i][i]; } return Xn; } int main() { Matrix B(4); B.Input(); double *X; X=Dooli(B); cout<<"~~~~解得:"<<endl; for(int i=0;i<B.size;i++) cout<<"X["<<i<<"]:"<<X[i]<<" "; cout<<endl<<"呵呵呵呵呵"; return 0; }
标签: 道理特分解法
上传时间: 2018-05-20
上传用户:Aa123456789
部分实现函数,需要先将信号做时频域变换。
上传时间: 2018-06-08
上传用户:taiyupite1
宽带信号DOA估计算法,在频域分子带利用窄带方法处理
标签: ism
上传时间: 2019-03-14
上传用户:luluhuohu
DUFFING实例解释比较详细,包含频域、时域、分岔、相图、庞加莱截面
上传时间: 2019-06-04
上传用户:hls11
单载波MMSE均衡的源代码,仿真代码,可以使用
上传时间: 2019-06-10
上传用户:你的思思
Gabor变换属于加窗傅立叶变换,Gabor函数可以在频域不同尺度、不同方向上提取相关的特征。另外Gabor函数与人眼的生物作用相仿,所以经常用作纹理识别上,并取得了较好的效果。
上传时间: 2019-07-12
上传用户:DemonISD
简单的线性调频chirp信号Matlab仿真,画出其时域与频域波形
上传时间: 2019-07-25
上传用户:waiting1616
数字示波器功能强大,使用方便,但是价格相对昂贵。本文以Ti的MSP430F5529为主控器,以Altera公司的EP2C5T144C8 FPGA器件为逻辑控制部件设计数字示波器。模拟信号经程控放大、整形电路后形成方波信号送至FPGA测频,根据频率值选择采用片上及片外高速AD分段采样。FPGA控制片外AD采样并将数据输入到FIFO模块中缓存,由单片机进行频谱分析。测试表明:简易示波器可以实现自动选档、多采样率采样、高精度测频及频谱分析等功能。Digital oscilloscope is powerful and easy to use, but also expensive. The research group designed a low-cost digital oscilloscope, the chip of MSP430F5529 of TI is chosen as the main controller and the device of EP2C5T144C8 of Altera company is used as the logic control unit. Analog signal enter the programmable amplifier circuit, shaping circuit and other pre-processing circuit. The shaped rectangular wave signal is sent to FPGA for measure the frequency. According to the frequency value to select AD on-chip or off-chip high-speed AD for sampling. FPGA controls the off-chip AD sampling and buffers AD data by FIFO module. The single chip microcomputer receives the data, and do FFT for spectrum analysis. The test shows that the simple oscilloscope can realize automatic gain selection, sampling at different sampling rates, high precision frequency measurement and spectrum analysis.
上传时间: 2022-03-27
上传用户:
基于时域有限差分法的非均匀多导体传输线瞬态分析_齐磊.pdf 159KB2020-03-03 15:50 基于时域有限差分法的电缆系统电磁瞬态分析_齐磊.pdf 234KB2020-03-03 15:50 回流路径与传输线模型建构及信号完整性分析.pdf 730KB2020-03-03 15:50 非均匀多导体传输线耦合分析与计算_陈小平.rar 908KB2020-03-03 15:50 非均匀传输线综合的特征法_毛军发.pdf 374KB2020-03-03 15:50 多导体传输线时域响应分析的卷积_特征法_毛军发.pdf 555KB2020-03-03 15:50 多导体传输线的时域有限差分法研究_齐磊.rar 1.2M2020-03-03 15:50 电磁脉冲对传输线耦合规律的研究_张志军.rar 8.3M2020-03-03 15:50 差分走线和PCB信号完整性分析.pdf 144KB2020-03-03 15:50 不等长非均匀有损耗传输线FDTD瞬态分析_史凌峰.pdf 668KB2020-03-03 15:50 不等长多导体传输线瞬态响应的FDTD模拟_李莉.pdf 133KB2020-03-03 15:50 PCB传输线信号完整性及电磁兼容特性研究_陈建华.rar …………
上传时间: 2013-07-21
上传用户:eeworm
ADS电子设计自动化(EDA软件全称为 Advanced Design System,是美国安捷伦(Agilent)公司所生产拥有的电子设计自动化软件;ADS功能十分强大,包含时域电路仿真 (SPICE-like Simulation)、频域电路仿真 (Harmonic Balance、Linear Analysis)、三维电磁仿真 、通信系统仿真(Communication System Simulation)和数字信号处理仿真设计(DSP);支持射频和系统设计工程师开发所有类型的 RF设计,从离散的射频/微波模块到用于通信和航天/国防的集成MMIC,是当今国内各大学和研究所使用最多的微波/射频电路和通信系统仿真软件软件。
上传时间: 2013-07-21
上传用户:eeworm