-
#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
-
% Computation of ST-ZCR and STE of a speech signal.
%
% Functions required: zerocross, sgn, winconv.
%
% Author: Nabin Sharma
% Date: 2009/03/15
[x,Fs] = wavread('so.wav'); % word is: so
x = x.';
N = length(x); % signal length
n = 0:N-1;
ts = n*(1/Fs); % time for signal
% define the window
wintype = 'rectwin';
winlen = 201;
winamp = [0.5,1]*(1/winlen);
標簽:
短時過零率和短時能量
上傳時間:
2019-09-23
上傳用戶:minwenji
-
The contemporary view of the Smart City is very much static and infrastructure-
centric, focusing on installation and subsequent management of Edge devices and
analytics of data provided by these devices. While this still allows a more efficient
management of the city’s infrastructure, optimizations and savings in different do-
mains, the existing architectures are currently designed as single-purpose, vertically
siloed solutions. This hinders active involvement of a variety of stakeholders (e.g.,
citizens and businesses) who naturally form part of the city’s ecosystem and have an
inherent interest in jointly coordinating and influencing city-level activities.
標簽:
Internet
Systems
Cities
People
Things
Smart
The
and
of
上傳時間:
2020-05-26
上傳用戶:shancjb
-
The Internet of Things is considered to be the next big opportunity, and challenge, for the
Internet engineering community, users of technology, companies and society as a whole. It
involves connecting embedded devices such as sensors, home appliances, weather stations
and even toys to Internet Protocol (IP) based networks. The number of IP-enabled embedded
devices is increasing rapidly, and although hard to estimate, will surely outnumber the
number of personal computers (PCs) and servers in the future. With the advances made over
the past decade in microcontroller,low-power radio, battery and microelectronic technology,
the trend in the industry is for smart embedded devices (called smart objects) to become
IP-enabled, and an integral part of the latest services on the Internet. These services are no
longer cyber, just including data created by humans, but are to become very connected to the
physical world around us by including sensor data, the monitoring and control of machines,
and other kinds of physical context. We call this latest frontier of the Internet, consisting of
wireless low-power embedded devices, the Wireless Embedded Internet. Applications that
this new frontier of the Internet enable are critical to the sustainability, efficiency and safety
of society and include home and building automation, healthcare, energy efficiency, smart
grids and environmental monitoring to name just a few.
標簽:
Embedded
Internet
Wireless
6LoWPAN
The
上傳時間:
2020-05-26
上傳用戶:shancjb
-
For nearly a hundred years telecommunications provided mainly voice services and very low speed
data (telegraph and telex). With the advent of the Internet, several data services became mainstream
in telecommunications; to the point that voice is becoming an accessory to IP-centric data networks.
Today, high-speed data services are already part of our daily lives at work and at home (web surfing,
e-mail, virtual private networks, VoIP, virtual meetings, chats...). The demand for high-speed data
services will grow even more with the increasing number of people telecommuting.
標簽:
WiMAX
WLAN
LTE
and
上傳時間:
2020-05-27
上傳用戶:shancjb
-
One of the very first books published on the social impact of the mobile phone
was Timo Kopomaa’s The City in Your Pocket: Birth of the Mobile Information Society.
The book, published in 2000, was based on research that Kopomaa had under-
taken for Nokia and Sonera as part of his doctoral studies in the Centre for Urban
and Regional Studies at the Helsinki University of Technology. The first line he
writes in the book is peculiar: ‘Mobile communication is not a serious matter’. By
this, we assume he is referring to a view of the world that would regard the mobile
phone as little more than an unremarkable fact of everyday life – a simple play-
thing for the young, or a productivity tool for the business executive and busy
parent.
標簽:
Communications
Wireless
Mobile
and
上傳時間:
2020-05-30
上傳用戶:shancjb
-
Wireless means different things to different people. For this book, it refers
to the radio systems that provide point-to-point, point-to-multipoint, and
Earth-space communications over transmission links that propagate outside
buildings through the lower atmosphere. Wireless systems are being built
that provide data transmission between computers and other devices on
one’s own desk. These are part of the wireless world but not the part where,
except for interference perhaps, the atmosphere has any influence. The intent
of this book is to provide a description of the physical phenomena that can
affect propagation through the atmosphere, present sample measurements
and statistics, and provide models that system designers can use to calculate
their link budgets and estimate the limitations the atmosphere may place on
their design.
標簽:
Communication
Propagation
Handbook
Wireless
for
上傳時間:
2020-05-31
上傳用戶:shancjb
-
Quality of Service ( QoS ) has always been in a world of its own, but as the technology
has been refi ned and has evolved in recent years, QOS usage has increased to the point
where it is now considered a necessary part of network design and operation. As with
most technologies, large - scale deployments have led to the technology becoming more
mature, and QOS is no exception.
標簽:
QOS-Enabled
Networks
上傳時間:
2020-05-31
上傳用戶:shancjb
-
This paper presents a Hidden Markov Model (HMM)-based speech
enhancement method, aiming at reducing non-stationary noise from speech
signals. The system is based on the assumption that the speech and the noise
are additive and uncorrelated. Cepstral features are used to extract statistical
information from both the speech and the noise. A-priori statistical
information is collected from long training sequences into ergodic hidden
Markov models. Given the ergodic models for the speech and the noise, a
compensated speech-noise model is created by means of parallel model
combination, using a log-normal approximation. During the compensation, the
mean of every mixture in the speech and noise model is stored. The stored
means are then used in the enhancement process to create the most likely
speech and noise power spectral distributions using the forward algorithm
combined with mixture probability. The distributions are used to generate a
Wiener filter for every observation. The paper includes a performance
evaluation of the speech enhancer for stationary as well as non-stationary
noise environment.
標簽:
Telecommunications
Processing
Signal
for
上傳時間:
2020-06-01
上傳用戶:shancjb
-
Spread-spectrum communication is a core area within the field of digital
communication. Originally used in military networks as countermeasures against
the threats of jamming and interception, spread-spectrum systems are now widely
used in commercial applications and are part of several wireless and mobile
communication standards. Although spread-spectrum communication is a staple
topic in textbooks on digital communication, its treatment is usually cursory. This
book is designed to provide a more intensive examination of the subject that is
suitable for graduate students and practicing engineers with a solid background
in the theory of digital communication. As the title indicates, this book stresses
principles rather than specific current or planned systems, which are described in
manyotherbooks.My goal in this bookis to providea concisebut lucidexplanation
of the fundamentals of spread-spectrum systems with an emphasis on theoretical
principles.
標簽:
Spread-Spectrum
Communication
Systems
2nd
上傳時間:
2020-06-01
上傳用戶:shancjb