#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
obot control, a subject aimed at making robots behave as desired, has been extensively developed for more than two decades. Among many books being published on this subject, a common feature is to treat a robot as a single system that is to be controlled by a variety of control algorithms depending on different scenarios and control objectives. However, when a robot becomes more complex and its degrees of freedom of motion increase substantially, the needed control computation can easily go beyond the scope a modern computer can handle within a pre-specified sampling period. A solution is to base the control on subsystem dynamics.
标签: decomposition virtual control
上传时间: 2019-09-04
上传用户:txb96
function [R,k,b] = msc(A) % 多元散射校正 % 输入待处理矩阵,通过多元散射校正,求得校正后的矩阵 %% 获得矩阵行列数 [m,n] = size(A); %% 求平均光谱 M = mean(A,2); %% 利用最小二乘法求每一列的斜率k和截距b for i = 1:n a = polyfit(M,A(:,i),1); if i == 1 k = a(1); b = a(2); else k = [k,a(1)]; b = [b,a(2)]; end end %% 求得结果 for i = 1:n Ai = (A(:,i)-b(i))/k(i); if i == 1 R = Ai; else R = [R,Ai]; end end
上传时间: 2020-03-12
上传用户:15275387185
3 Dimensions TV (3DTV) became commercially available in the United States in 2010 and service in other countries was expected to follow soon thereafter. 3DTV is a subset of a larger discipline known as 3D Video (3DV). There are now many routine vendor announcements related to 3DTV/3DV, and there are also conferences wholly dedicated to the topic.
标签: Transmission Encoding Content Capture 3DTV and
上传时间: 2020-05-23
上传用户:shancjb
This book was conceived in such a special way. From our experience, and despite the increasing interest that we perceived amongst the research community in HAPS, there was not any book in the market entirely devoted to HAPS. We could only find some satellite communications books including only fragments related to HAPS, covering the ‘generalities’. A need for a reference book which could highlight state- of-the-art HAPS-related topics was therefore envisaged. Moreover, most of the information related to HAPS could only be found in technical reports, official recommendations, conference proceedings and journal papers.
上传时间: 2020-05-27
上传用户:shancjb
With the rapid expansion of wireless consumer products,there has been a con- siderable increase in the need for radio-frequency (RF) planning, link plan- ning, and propagation modeling.A network designer with no RF background may find himself/herself designing a wireless network. A wide array of RF planning software packages can provide some support, but there is no substi- tute for a fundamental understanding of the propagation process and the lim- itations of the models employed. Blind use of computer-aided design (CAD) programs with no understanding of the physical fundamentals underlying the process can be a recipe for disaster. Having witnessed the results of this approach, I hope to spare others this frustration.
标签: Introduction Propagation to RF
上传时间: 2020-05-27
上传用户:shancjb
Advances in communication and networking technologies are rapidly making ubiq- uitous network connectivity a reality. Wireless networks are indispensable for supporting such access anywhere and at any time. Among various types of wire- less networks, multihop wireless networks (MWNs) have been attracting increasing attention for decades due to its broad civilian and military applications. Basically, a MWN is a network of nodes connected by wireless communication links. Due to the limited transmission range of the radio, many pairs of nodes in MWNs may not be able to communicate directly, hence they need other intermediate nodes to forward packets for them. Routing in such networks is an important issue and it poses great challenges.
标签: Multihop Wireless Networks
上传时间: 2020-05-31
上传用户:shancjb
Performance analysis belongs to the domain of applied mathematics. The major domain of application in this book concerns telecommunications sys- tems and networks. We will mainly use stochastic analysis and probability theory to address problems in the performance evaluation of telecommuni- cations systems and networks. The first chapter will provide a motivation and a statement of several problems.
标签: Communications Performance Analysis Networks of
上传时间: 2020-05-31
上传用户:shancjb
The serious study of the practice of how to determine the appropriate content of a specification is a seldom-appreciated pastime. Those who have the responsibility to design a product would prefer a greater degree of freedom than permitted by the con- tent of a specification. Many of those who would manage those who would design a product would prefer to allocate all of the project funding and schedule to what they consider more productive labor. These are the attitudes, of course, that doom a project to defeat but they are hard to counter no matter how many times repeated by design engineers and managers. A system engineer who has survived a few of these experiences over a long career may retire and forget the past but we have an endur- ing obligation to work toward changing these attitudes while trying to offer younger system engineers a pathway toward a more sure success in requirements analysis and specification publishing.
标签: Requirements Analysis System
上传时间: 2020-06-01
上传用户:shancjb
The goal of this book is to introduce the simulation methods necessary to describe the behaviour of semiconductor devices during an electrostatic discharge (ESD). The challenge of this task is the correct description of semiconductor devices under very high current density and high temperature transients. As it stands, the book can be no more than a snapshot and a summary of the research in this field during the past few years. The authors hope that the book will provide the basis for further development of simulation methods at this current frontier of device physics.
标签: Development Protection ESD
上传时间: 2020-06-05
上传用户:shancjb