text:
Replica Symmetry Breaking in Bipartite Spin Glasses and Neural Networks

# Replica Symmetry Breaking in Bipartite Spin Glasses and Neural Networks

Gavin Hartnett,    Edward Parker,    Edward Geist
###### Abstract

Some interesting recent advances in the theoretical understanding of neural networks have been informed by results from the physics of disordered many-body systems. Motivated by these findings, this work uses the replica technique to study the mathematically tractable bipartite Sherrington-Kirkpatrick (SK) spin glass model, which is formally similar to a Restricted Boltzmann Machine (RBM) neural network. The bipartite SK model has been previously studied assuming replica symmetry; here this assumption is relaxed and a replica symmetry breaking analysis is performed. The bipartite SK model is found to have many features in common with Parisi’s solution of the original, unipartite SK model, including the existence of a multitude of pure states which are related in a hierarchical, ultrametric fashion. As an application of this analysis, the optimal cost for a graph partitioning problem is shown to be simply related to the ground state energy of the bipartite SK model. As a second application, empirical investigations reveal that the Gibbs sampled outputs of an RBM trained on the MNIST data set are more ultrametrically distributed than the input data itself.

institutetext: STAG Research Centre
School of Mathematical Sciences
University of Southampton
gshartnett@gmail.com
institutetext: Department of Physics
University of California at Santa Barbara
Santa Barbara, CA 93106

## 1 Introduction

Research into deep neural networks has advanced at a stunning rate in recent years, leading to tremendous progress for a number of difficult machine learning problems and benchmarks lecun2015deep (). Despite these impressive accomplishments, there is a sense in which much of the recent progress has been made in engineering new methods and techniques, and that the development of a robust theoretical understanding has lagged behind. This state of affairs is a natural consequence both of the inherent difficulty in building a strong theoretical framework, and in the unprecedented rate of success that neural networks have had in solving machine learning problems.

Recently, some interesting advances in improving the theoretical understanding of neural networks have been inspired by results from physics, particularly the physics of disordered many-body systems. For example, in bray2007statistics (), Bray and Dean considered Gaussian random fields in high-dimensional spaces and calculated many properties of the distribution of critical points. Although the neural networks used in practical applications are certainly not Gaussian random fields, Dauphin et al. dauphin2014identifying () found through an empirical analysis that Bray and Dean’s observations for Gaussian random fields hold for neural networks trained on common machine learning data sets, such as MNIST and CIFAR-10. These include the result that high-error saddles pose a difficulty for training neural networks, and that most local minima have errors very close to the global minimum error. By drawing inspiration from physics, machine learning researchers were able to improve their understanding of neural networks, and moreover were led to propose a new Newton’s method algorithm for optimization problems which suffer from many saddle points.

Another advance in the theoretical understanding of neural networks that borrows from physics was made in choromanska2015loss (), where it was observed that under certain simplifying assumptions, the error surface of feed-forward neural networks can be mapped precisely to the energy landscape for a physics model known as the -spin spherical spin-glass, for which exact results have recently been derived in auffinger2013random (); auffinger2013complexity (). As in the Dauphin et al. study, these authors then empirically verified that these mathematical insights qualitatively apply to neural networks trained on MNIST, even though the assumptions behind the spin glass analysis no longer hold.111It is also worth noting that interesting progress has been made recently in the other direction, namely using machine learning methods to learn more about condensed matter systems carrasquilla2017machine (). Yet another recent work along these lines is schoenholz2017correspondence ().

Inspired by these results, in this work we study in detail a mathematically tractable spin glass model, and then use these results to better understand a family of neural networks. The spin glass model we consider is a simple extension of the paradigmatic Sherrington-Kirkpatrick (SK) model sherrington1975solvable (). The SK model is an infinite-range spin glass with Hamiltonian

 HSK=−∑i

Here , are binary spins, . The 2-spin couplings are independent identically distributed (iid) random variables drawn from a normal distribution with mean and standard deviation . The SK model is an ideal toy model; despite its simplicity its theoretical analysis is very rich and involves phenomena such as a continuous order parameter, an ultrametric space of states, and stochastic branching processes. In fact, the historical analysis of the SK model is very closely tied to the development of spin glass theory.

As every spin in the SK model couples to every other spin, the couplings may be characterized in terms of a complete graph. In this paper, we consider the extension of the SK model to complete bipartite graphs, which we will refer to as the “bipartite SK model.” The special case of balanced bipartite graphs has been studied for quite some time korenblit1985spin (); korenblit1985magnetic (); korenblit1987magnetic (); fyodorov1987antiferromagnetic (); fyodorov1987phase (); oppermann2004modulated (), but the general case has only been studied much more recently barra2017phase (); barra2017phase2 (); barra2011equilibrium (); barra2012glassy (); barra2014mean (); barra2015multi (); panchenko2015free (); genovese2016non (); fedele2012rigorous (); genovese2012universality (). These papers have calculated the model’s phase diagram in certain regimes fyodorov1987antiferromagnetic (); barra2011equilibrium (); barra2017phase () (related to our results in the next section), but to our knowledge the replica symmetry breaking of the bipartite SK model, which is crucial for correctly describing the physics of the spin glass phase, has been much less well-studied.222Some relevant works are as follows. oppermann2004modulated () considered the replica symmetry breaking for the special case of balanced bipartite graphs. barra2015multi () considered the replica symmetry breaking of multi-species spin models and proved an upper bound on the free energy, and panchenko2015free () subsequently showed that the bound is sharp. However, the model they considered necessarily allows self-interactions between species, unlike the bipartite model considered here. baik2017free () considered the bipartite spherical SK model. decelle2017spectral (); decelle2018thermodynamics () performed a replica-symmetric analysis very similar to the one we perform in Sec. 2.1.

Our primary motivation for studying the bipartite SK model is its similarity to a family of neural networks known as Restricted Boltzmann Machines (RBMs) smolensky1986information (). RBMs are generative models used in unsupervised learning, and are appealing to study from a physics perspective because they are energy-based models with a Hamiltonian of the same parametric form as the bipartite SK model. In fact, the only real difference between the bipartite SK model and the RBM lies in how the parameters are chosen. In the bipartite SK model they are iid normally distributed, whereas in the RBM they are determined by a learning algorithm. Therefore, similar in spirit to Dauphin et al dauphin2014identifying () and Choromanska et al choromanska2015loss (), it is plausible that the spin glass analysis of the bipartite SK model could provide novel insights into RBMs. Indeed, we will find this to be the case.

The outline of this paper is as follows. First, in Sec. 2 we analyze the bipartite SK model, considering both the replica symmetric and replica symmetry breaking cases. Then in Sec. 3 we consider a combinatorial optimization problem for which the optimal cost can be shown to be simply related to the ground state energy of the bipartite SK model. In Sec. 4 we present the results from a range of numerical investigations, including Markov-chain Monte Carlo (MC) simulations, and find good agreement. In Sec. 5, we empirically investigate the extent to which RBMs trained on realistic data exhibit spin glass phenomena. We conclude in Sec. 6.

## 2 The Bipartite Sherrington-Kirkpatrick Model

In this section we study the statistical physics of an infinite-range spin glass model called the bipartite SK model, which generalizes the famous Sherrington-Kirkpatrick (SK) model sherrington1975solvable () to a bipartite coupling graph. The Hamiltonian is

 H=−Nv∑i=1Nh∑j=1Wijvihj−Nv∑i=1b(v)ivi−Nh∑j=1b(h)jhj. (2)

Here are spin variables which, anticipating the connection with RBMs in Sec. 5, we will call the visible and hidden spins, respectively. There are spins in total, divided into visible and hidden spins. We will use the convention that the index runs from 1 to , and the index runs from to . The parameters of the model are an matrix of couplings , and the - and -length vectors and which correspond to an independent external magnetic field for each spin. Following the machine learning literature, we will also refer to these as the biases. The Hamiltonian defines a Gibbs probability distribution over the spin variables,

 p(v,h)=e−βHZ, (3)

with the inverse temperature and

 Z=Tr e−βH (4)

the partition function. The Tr symbol indicates a sum over all configurations of the spin variables. The sum is intractable for both sets of spins together, but because there are no visible-visible or hidden-hidden couplings, it can be performed analytically if one set of spins is held fixed. For example, the marginal distribution over the visible spins can be written as , with

 Hv=−∑ib(v)ivi−1β∑jln[2cosh(βb(h)j+β∑iviWij)], (5)

and similarly for the hidden spins.

In the bipartite SK model, the parameters appearing in the Hamiltonian are independently drawn from normal distributions,

 Wij∼N(W0,W),b(v)i∼N(b(v)0,b(v)),b(h)j∼N(b(h)0,b(h)) (6)

where the notation indicates that the random variable is drawn from a normal distribution with mean and standard deviation . Our motivation for studying the bipartite model is its similarity to a class of neural networks used for unsupervised learning known as Restricted Boltzmann Machines (RBMs). RBMs are probabilistic models whose Hamiltonians take the same general form as Eq. 2, but with the parameters allowed to take on arbitrary values.333In the symmetric, uniform-bias case , , , the bipartite SK model is known as the Korenblit-Shender model korenblit1985spin (); korenblit1985magnetic (). and are typically equal in physical spin systems but not in RBMs. The spin-glass properties of RBMs will be the focus of Sec. 5.

Calculating the free energy

 F=−β−1lnZ (7)

for a specific choice of parameters (known as a “disorder realization” in physics terminology) is an intractable problem, but in the large- limit we can calculate the expectation value of the free energy with respect to the probability distributions given in Eq.’s 6. We will use the notation to denote this expectation value (known as the “disorder-averaged value”) for any quantity .

Crucially, in the large- limit, certain “self-averaging” quantities (including the free energy) become independent of the particular disorder realization. In order to have a well-defined large- limit in which the number of spins is infinite, the moments of the 2-spin coupling will need to be rescaled. Defining and , the limit may be taken while keeping , finite. We will also find it useful to introduce

 αv=NvN,αh=NhN. (8)

We can calculate using the replica method, which is based on the simple mathematical identity

 [lnZ]=∂[Zn]∂n∣∣∣n=0. (9)

is initially computed with taken to be a positive integer, and each copy of is referred to as a replica. At the end of the calculation, the above formula is used to compute and hence also . There are many mathematical subtleties associated with the replica method which have been discussed extensively in the physics literature; we therefore omit any further discussion here.

For the bipartite SK model, the disorder average may be taken immediately, yielding

 [Zn]=Trnexp ⎡⎣¯W0∑a,i,jvaihaj+¯W22∑a,b,i,jvaivbihajhbj (10) +¯b(v)0∑a,ivai+(¯b(v))22∑a,b,ivaivbi+¯b(h)0∑a,jhaj+(¯b(h))22∑a,b,jhajhbj⎤⎥ ⎥ ⎥⎦

Here the indices , run from 1 to , and label each replica. indicates a trace over all replicas, and a bar indicates that the inverse temperature has been absorbed into the parameter, for example .

In the analysis of the original, unipartite SK model, the Hubbard-Stratonovich integral transform is used to convert the argument of the exponential to be quadratic in the spin variables, at the cost of introducing an integral. For the bipartite SK model, there are two species of spin variables, and a different integral transform is required. Such a transform is provided by

 (11)

which converges for . This transform may be applied to the term in Eq. 10 for

 a=N√αvαh2¯w0,B=¯w0∑ivai,C=¯w0∑jhaj, (12)

and to the term for

 a=N√αvαh2¯w2,B=¯w2∑ivaivbi,C=¯w2∑jhajhbj. (13)

The resulting expression is

 [Zn]=(∫∏a

where

 βnFn= ¯w2√αvαh∑a

and

 Ψv=exp[∑a

In the above, the site indices for the spins have been dropped because the sums over sites factorize and each site is treated equally due to the disorder average, and refers to a trace over all replicas of just the visible spins only, and similarly for .

In the large- limit, the integral may be evaluated by steepest descents: . The indicates that has been evaluated at a saddle, which is determined by the following equations:

 X∗ab=√2√αvαhq(v)ab+√αhαvq(h)ab,~X∗ab=i√2√αvαhq(v)ab, (17a) Y∗ab=√αvαhq(v)ab+√2√αhαvq(h)ab,~Y∗ab=i√2√αhαvq(h)ab, (17b) U∗a=√2√αvαhm(v)a+√αhαvm(h)a,~U∗a=i√2√αvαhm(v)a, (17c) V∗a=√αvαhm(v)a+√2√αvαhm(h)a,~Va=i√2√αhαvm(h)a, (17d)

where we have introduced the average magnetizations

 m(v)a=1Nv∑i[⟨vai⟩],m(h)a=1Nh∑j[⟨haj⟩], (18)

as well as the overlaps

 q(v)ab=1Nv∑i[⟨vaivbi⟩],q(h)ab=1Nh∑j[⟨hajhbj⟩],for a≠b. (19)

Angled brackets denote a thermal average with respect to the Gibbs distribution Eq. 3.

It is not useful to immediately impose the saddle point equations because the trace must still be carried out in the terms. Before carrying out the traces, however, it is convenient to first convert to complex variables, defined by

 M(h)a=√αvαh(Ua+i~Ua),M(v)a=√αhαv(Va+i~Va), (20a) ˆM(h)a=√αvαh(Ua−i~Ua),ˆM(v)a=√αhαv(Va−i~Va), (20b) Q(h)ab=√αvαh(Xab+i~Xab),Q(v)ab=√αhαv(Yab+i~Yab), (20c) ˆQ(h)ab=√αvαh(Xab−i~Xab),ˆQ(v)ab=√αhαv(Yab−i~Yab), (20d)

These variables have the useful property that the hatted variables do not depend on the traces, and so their saddle equations may be immediately solved for, yielding444Note that the hatted quantities are not necessarily the complex conjugates of the un-hatted quantities: this is true only if the saddle solutions of the variable are all real, which will turn out not to be the case.

 βnF∗n= √αvαh(¯w2∑a

where now

 Ψv=exp[∑a

(The notation means that the equivalent equation with every appearance of the labels and interchanged also holds.) This choice of variables has the additional property that the saddle equations Eq. 17 become simply , , , .

At this point the calculation has been formulated as a simple extension of the usual replica symmetry breaking calculation of the unipartite model – see for example dotsenko2005introduction (); mezard1987spin (); nishimori2001statistical (). One interesting point to note is that if and , , then there is a symmetry between the visible and hidden spins and the expression reduces to exactly that of the unipartite SK model. We have verified that our results reduce to those of the SK model when this condition is imposed.

For simplicity, we will henceforth neglect the bias terms by setting them to zero.555korenblit1985spin (); korenblit1985magnetic (); korenblit1987magnetic (); fyodorov1987antiferromagnetic (); fyodorov1987phase (); oppermann2004modulated () considered the effect of a uniform bias in the special case of the Korenblit-Shender model defined in footnote 3. The free energy is invariant under the transformation , which corresponds to flipping all the spins in the visible part (and also under the equivalent transformation for the hidden part). In the bipartite SK model, this corresponds to and either or but not both). In the zero-bias case we will consider, the free energy is therefore symmetric in , and without loss of generality we will only consider the ferromagnetic case .

As in the SK model, an ansatz for the matrix structure of the integration variables will need to be specified in order to proceed. We will first assume a replica symmetric ansatz and analyze the phase diagram. Replica symmetry is broken in the spin glass phase, and in the subsequent section the replica symmetry breaking (RSB) ansatz of Parisi will be used.

### 2.1 Replica Symmetric Analysis

First, we assume a replica symmetric ansatz, with all matrix and vector entries equal:

 Q(h)ab∗=q(h),Q(v)ab∗=q(v),M(h)a∗=m(h),M(v)a∗=m(v), (23)

which results in

 βF∗n=√αvαh[¯w22((n−1)q(v)q(h)−1)+¯w0m(v)m(h)]−αvnlogTrn,vΨv−αhnlogTrn,hΨh, (24)

where now

 Ψv=exp[√αhαv(¯w2q(h)∑a

The quadratic spin terms in may be linearized through the Hubbard-Stratonovich transform, after which the traces become trivial. Finally, Eq. 9 may be used to yield the free energy density, , with the result that

 β[f]= √αvαh[−¯w22(q(v)−1)(q(h)−1)+¯w0m(v)m(h)] (26) −αv⟨log2cosh[√αhαv(¯w√q(h)z+¯w0m(h))]⟩z −αh⟨log2cosh[√αvαh(¯w√q(v)z+¯w0m(v))]⟩z.

where indicates an expectation value taken over the Gaussian random variable with zero mean and unit variance that was introduced by the Hubbard-Stratonovich transform,

 ⟨g(z)⟩z=∫∞−∞dz√2πe−z2/2g(z). (27)

Extremizing the free energy with respect to the variables yields the saddle equations

 m(v)=⟨tanh[√αhαv(¯w√q(h)z+¯w0m(h))]⟩z, (28a) q(v)=⟨tanh2[√αhαv(¯w√q(h)z+¯w0m(h))]⟩z, (28b)

and the equivalent equations with .

We can now map out the phase diagram of the zero-bias system, and we find three phases. In the paramagnetic phase, with , each spin fluctuates randomly over time. In the ferromagnetic phase, with , the spins are frozen into a single globally aligned symmetry-breaking direction. In the spin-glass phase, with but , each individual spin is frozen in a particular direction, but an equal number are frozen in each direction, so there is no net magnetization.

The equations Eq. 28 must be solved numerically, except in the vicinity of the transitions that border the paramagnetic phase, at which both the magnetizations and overlaps are small and a perturbative analysis may be applied. The ferromagnetic/spin glass transition is not accessible via perturbative methods as the overlap is non-zero on both sides of the transition. Perturbative analysis yields the following critical lines: for as a phase boundary between the paramagnetic and ferromagnetic phases, and as the boundary between the paramagnetic and spin glass phases. The ferromagnet/spin glass phase boundary can be solved numerically by expanding the equations Eq. 28 around zero magnetization. The paramagnetic/spin glass phase boundary for was previously derived (with different conventions) in barra2011equilibrium (); barra2017phase (). We plot the zero-bias phase diagram in Fig. 1.666This phase diagram only applies for the case of zero biases. When the bias means are non-zero, the Hamiltonian is no longer symmetric under the transformation and the ferromagnetic and antiferromagnetic cases are no longer equivalent. Assuming the bias means have the same sign, in the ferromagnetic case the transition between the paramagnetic and ferromagnetic phases disappears and they merge into a single phase, which has but is best thought of as the paramagnetic phase, because the ground state is unique and there is no symmetry breaking. In the antiferromagnetic case , the two parts magnetize unequally, with the larger part more strongly magnetized (in the symmetric case , there remains a symmetry-breaking phase in which the larger magnetization is selected spontaneously). Both cases still have a spin glass phase characterized by many pure states mezard1987spin (); korenblit1985spin (), but with a net magnetization.

In more detail, the ferromagnet/spin glass boundary may be solved for by first specifying a value of . Then the overlaps are determined by solving the Eq.’s 28a28b evaluated at zero magnetization. Finally, the value of corresponding to the phase boundary may be determined by solving Eq.’s 28a28b expanded to first order in the magnetizations, which can be combined to yield the equation

 (29)

In the paramagnetic phase, the magnetizations and overlaps are zero, and the expression for the free energy Eq. 26 simplifies to

 β[f]=−√αvαh2¯ω2−log2. (30)

This expression was first derived in barra2011equilibrium (), and it was also proven that this replica-symmetric expression is valid in this phase. In the SK model, the assumption of replica symmetry fails to hold in the spin glass phase and in a low-temperature subset of the ferromagnetic phase due to the presence of unstable modes, as shown by de1978stability (). We expect the same is true for the bipartite SK model, however we will omit a detailed stability analysis here. Instead, the unphysical nature of the replica symmetric solution may be illustrated by the fact that it predicts a negative entropy in the zero temperature limit within the spin glass phase. In particular, setting , the zero temperature limit of the saddle equations Eq. 28 yield zero magnetization, , as well as

 q(v)=1−√2π√αvαhTw+O(T2),v↔h. (31)

This may be inserted into the free energy to yield

 [f]=−2√2π√αvαhw+1−√αvαhπT+O(T2). (32)

As the free energy is related to the entropy via at fixed volume and particle number, the assumption of replica symmetry predicts an entropy density , which is negative for all and hence unphysical.

### 2.2 Replica Symmetry Breaking Analysis

In this section we drop the assumption of replica symmetry, which fails to hold in the spin glass phase. (oppermann2004modulated () performed a similar calculation for the related Korenblit-Shender model defined in footnote 3, in which ; here we consider zero biases but arbitrary .)

#### 2.2.1 Review: Parisi Ansatz

Parisi famously proposed in parisi1980sequence () a very interesting ansatz for replica symmetry breaking in the context of the original unipartite SK model. We will consider the natural extension of his ansatz to the bipartite model studied here. In order for the presentation to be as self-contained as possible, we first briefly review the Parisi ansatz for the unipartite SK model for a single set of spins , with Hamiltonian given by Eq. 1.

The spin glass phase of the unipartite SK model is characterized by a free energy with many local minima separated by high free energy barriers. As a result, thermodynamic averages may be decomposed into sums of pure states. If the pure states are indexed by (the reason for using the same index as for the replicas will become apparent soon), then for any observable ,

 ⟨O⟩=Tr(e−βHO)Z=∑awa⟨O⟩a, (33)

where the weights of the pure states are given by , with the free energy of the pure state. Pure states satisfy cluster decomposition, which for an infinite-dimensional model such as the bipartite SK model implies that correlation functions of observables at different sites must factorize: . The large free energy barriers between pure states cause ergodicity to be broken, so that the system becomes trapped in a single pure state during time evolution.

The relationship between the existence of many distinct pure states and the replica method was first worked out by Parisi parisi1980sequence (), who showed that the matrix which measures the overlap between replicas and may be identified with the matrix which measures the overlap between pure states and . This corresponds to equating

 Qab=1N∑i⟨si⟩a⟨si⟩b, (34)

and justifies using the same index for replicas and pure states. Under time evolution, ergodicity is broken, and different replicas can spontaneously equilibrate into different pure states despite having been initialized equivalently. Thus, to properly capture the physics of the many pure states, an ansatz for the overlap matrix must be specified which breaks the permutation symmetry between replicas.

Parisi introduced a particularly interesting ansatz, which may be constructed according to the following prescription. First, a series of integers is introduced, , , with , and , and all assumed to be integers. The off-diagonal elements of the overlap matrix are then parametrized according to

 Qab=qI,for⌈amI⌉=⌈bmI⌉and⌈amI+1⌉≠⌈bmI+1⌉, (35)

where is the ceiling function. The form a sequence of variational parameters which replace the role of in the replica-symmetric analysis. An example of this ansatz is depicted below in Fig. 2.

This ansatz breaks the permutation symmetry among replicas in a sequential, iterative manner. The symmetry is broken between pure states belonging to different blocks, and as increases the number of different blocks increases. The case corresponds to the replica symmetric case considered previously. Finite corresponds to partial symmetry breaking, and is referred to as the RSB-k scheme. In the extreme case where , the symmetry is fully broken. Regardless of the degree to which replica symmetry is broken, eventually the limit is taken and the overlap matrix becomes .

At this point, the relationship between the replica symmetry breaking ansatz for and the many pure states can be seen by computing

 PJ(q)=∑a,bwawbδ(qab−q), (36)

which is the probability distribution of finding two pure states, and with a given overlap . The subscript indicates that this expression is not self-averaging; unlike the free energy, it depends on the particular realization for the coupling matrix. After imposing the Parisi ansatz for , taking the disorder average, and the limit, the overlap probability can be shown to be expressible as

 P(q)=[PJ(q)]=dx(q)dq,x(q)=∫q0dq′P(q′). (37)

With , the sequence of overlaps has been converted to a continuous function of a single variable, , and moreover that function has been related to the probability of finding two states with a given overlap. The inverse function is the cumulative distribution function for the random variable , and gives the probability of finding an overlap less than or equal to . The overlap is the quantile function for , with domain and range .777A subtley here is the fact that in the zero-bias case, for every pure state there is a partner state with the each spin reversed. This means that the overlap functions should lie within the interval . The replica symmetry breaking ansatz implicitly assumes that , and so the probability distribution across the full interval is related to those of Eq. 37 via . See p. 32 of mezard1987spin () for more details on this point. Thus, breaking of replica symmetry has allowed for a multitude of distinct pure states with different overlaps between each other.

Perhaps the most fascinating feature of Parisi’s replica symmetry breaking solution of the SK model is the fact that the space of pure states is ultrametric mezard1984nature (); mezard1987replica (). Just as is defined to be the disorder-averaged probability that two arbitrary pure states, and , will have an overlap , a 3-state overlap distribution may also be defined. For pure states , may be defined to be the probability that , , and . Interestingly, unlike the case of which can only be analytically calculated near criticality, the 3-state overlap distribution of the SK model may be calculated in the spin glass phase for any value of the temperature mezard1984nature (); mezard1987replica ():

 P(q1,q2,q3)= 12P(q1)x(q1)δ(q1−q2)δ(q1−q3) (38) +12(P(q1)P(q2)θ(q1−q2)δ(q2−q3)+cyclic permutations),

where is the Heaviside theta function.

The simple expression for the 3-overlap distribution, Eq. 38, implies that the pure states of the model are arranged in a tree-like structure. This can be best seen by first introducing the distance between pure states:

 (dab)2=1N∑i(⟨si⟩a−⟨si⟩b)2=2(qEA−qab), (39)

where is the state-independent Edwards-Anderson order parameter. Assuming without loss of generality that , Eq. 38 implies that is non-zero only for

 dac≤dab=dbc. (40)

Thus, all triangles in the space of states are either equilateral or isosceles with the unequal side shorter than the equal sides.

Metric spaces satisfying Eq. 40 are called ultrametric.888The defining equation for ultrametric spaces is normally written as , which is equivalent to Eq. 40. For a review of ultrametricity from the perspective of physics, see rammal1986ultrametricity (). One interesting property of ultrametric spaces which is relevant here is that points in such a space may be associated with the leaves of a tree diagram, and therefore, the dendrogram in Fig. 2 serves to illustrate how the assumption of ultrametricity is implicitly contained within the Parisi ansatz, Eq. 35. The phenomenon of ultrametricity may be understood dynamically. As the temperature is lowered, ancestor pure states split into descendant pure states according to a stochastic branching process mezard1987spin () depicted in Fig. 3 below.

#### 2.2.2 Free Energy

Given the form of Eq. 21, it is natural to separately assume the Parisi ansatz for each of the two overlap matrices, , . We will not attempt to rigorously prove the correctness of this ansatz in the bipartite model, but in Sec. 4 we show good agreement with Monte Carlo simulations. One immediate implication of the ansatz is that the pure states in the bipartite model will also be ultrametrically distributed. The derivation of Eq. 38 only relies on the properties of the algebra of Parisi matrices (matrices of the form Eq. 35), and not on the functional form of the Hamiltonian. Thus, by repeating the original calculation for the marginal distributions , , one finds that the pure states in each reduced system will exhibit the same ultrametric structure.

The calculation of the free energy proceeds analogously to the SK calculation, which can be found in many textbooks mezard1987spin (); dotsenko2005introduction (); nishimori2001statistical (), and so we will not repeat the derivation here. A set of Parisi equations may be derived for infinite breaking of replica symmetry:

 β[f]= −√αvαh2¯w2(1+∫10dxq(v)(x)q(h)(x)−q(v)(1)−q(h)(1)) (41)

where we have introduced and to simplify the expressions. The functions , for , are determined to be a solution of the differential equation:

 ∂f(I)0∂x=−w22dr(I)dx⎛⎜⎝∂2f(I)0∂h2+x⎛⎝∂f(I)0∂h⎞⎠2⎞⎟⎠, (42)

The boundary condition is that .

These equations may be solved to a high degree of numerical precision using the methods of crisanti2002analysis (). As these techniques are somewhat involved, we will instead be content to solve the equations in the RSB-1 scheme. The variational parameters are (which should not be confused with the magnetization), and a sequence of -values for each spin species: , . The RSB-1 expression for the free energy is

 β[f]= −√αvαh2¯w2(1+mq(v)0q(h)0+(1−m)q(v)1q(h)1−q(v)1−q(h)1)−log2 (43) −αvm∫∞−∞dP(r(h)0,z)log(∫∞−∞dP(r(h)1−r(h)0,y)coshm[β(y+z)]) −αhm∫∞−∞dP(r(v)0,z)log(∫∞−∞dP(r(v)1−r(v)0,y)coshm[β(y+z)]),

where is a Gaussian measure, and the variables are related to the variables as in the above. The variational parameters are , and are chosen to maximize999In RSB calculations the free energy must be maximized rather than minimized due to the peculiarity of the limit. , subject to the constraint that , and , and similarly for the . We present the numerical solution of this equation, along with the results of MC simulations, in Sec. 4 below.

#### 2.2.3 Near-Critical Solution

Analytic results for the spin glass phase are in general not possible for the replica symmetry breaking analysis. However, they are obtainable in the vicinity of the spin-glass phase transition. Here we will work out the near-critical overlap distributions, and verify that in the RSB analysis the bipartite SK model exhibits a spin glass transition which is very similar to that of the standard, unipartite model. For simplicity, we will again set .

The starting point is the free energy, Eq. 21. In the paramagnetic phase, the overlap matrices will be zero, and in the spin glass phase, they will be non-zero. In the spin glass phase and near the phase boundary , they will be non-zero but small, and therefore the free energy may be expanded as

 βnFn= √αvαh¯w22(Tr[Q(h)Q(v)]−n)−nlog2 (44) −αv[(αhαv)¯w44Tr[(Q(h))2]+(αhαv)3/2¯w66Tr[(Q(h))3]+(αhαv)2¯w812∑ab[(Q(h)ab)4] −(αhαv)2¯w84∑abc[(Q(h)ab)


text:
State in electrodynamics

I have so far encountered the notion 'state' in classical mechanics, thermodynamics and quantum mechanics. I have, however, not seen this notion in the context of electrodynamics. Is there such a thing as a state in electrodynamics? My guess is it would be a pair consisting of an electric field vector and a magnetic field vector, but I can't really substantiate this idea.

format: plain


text:
# Permittivity

Permittivity describes the effect of material in determining the electric field in response to electric charge. For example, one can observe from laboratory experiments that a particle having charge

gives rise to the electric field

where

is distance from the charge,

is a unit vector pointing away from the charge, and

is a constant that depends on the material. Note that

increases with

, which makes sense since electric charge is the source of

. Also note that

is inversely proportional to

, indicating that

decreases in proportion to the area of a sphere surrounding the charge – a principle commonly known as the inverse square law. The remaining factor 1/

is the constant of proportionality, which captures the effect of material. Given units of

/

for

and

for

, we find that

must have units of farads per meter (

/

). (To see this, note that

.)

Permittivity (

,

/

) describes the effect of material in determining the electric field intensity in response to charge.

In free space (that is, a perfect vacuum), we find that

where:

The permittivity of air is only slightly greater, and usually can be assumed to be equal to that of free space. In most other materials, the permittivity is significantly greater; that is, the same charge results in a weaker electric field intensity.

It is common practice to describe the permittivity of materials relative to the permittivity of free space. This relative permittivity is given by:

Values of

for a few representative materials is given in Appendix 10.1 . Note that

ranges from 1 (corresponding to a perfect vacuum) to about 60 or so in common engineering applications. Also note that relative permittivity is sometimes referred to as dielectric constant. This term is a bit misleading, however, since permittivity is a meaningful concept for many materials that are not dielectrics.


text:
## Spring 2014

Date Speaker Title/Abstract
27 Feb Valeriy Slastikov
University of Bristol
Point defects in liquid crystals
We study liquid crystal defects in cylindrical domains. We employ Landau-de Gennes theory and provide a simplified description of global minimizers of Landau-de Gennes energy under homeothropic boundary conditions at the lateral boundary of the cylinder. We also provide explicit solutions describing defects of various strength under Lyuksutov's constraint.
13 Mar Daniel Matthes
Technische Universität München
Convex Lyapunov functionals for non-convex gradient flows: two examples
Various diffusion equations can be written as a gradient flow, i.e., their solutions are curves of steepest descent (with respect to a suitable metric) in some energy landscape (of a suitable potential). If the potential is strictly convex in the considered metric, then one immediately obtains quantitative estimates on the speed of convergence of solutions towards equilibrium. In this talk, I will discuss two examples in which the potential is not convex, but still good estimates on the long-time asymptotics can be derived by variational methods. The first example (joint with S. Linisi and G. Savare) is a family of fourth order degenerate parabolic equations, which arise e.g. in models for lubrication. The second example (joint work with J. Zinsl) is a system of two nonlinear diffusion equations modeling the aggregation of bacteria.
27 Mar Nicolas Dirr
Cardiff University
Uniqueness for minimisers of a nonlocal random functional
We consider a small random perturbation of the energy functional acting on functions on $\mathbb{R}^n$, which consists of a double-well potential and the Dirichlet form associated with a fractional Laplacian. The unperturbed functional has two minimisers (under compact perturbations), the constant functions $+1$ and $-1$. For a range of parameters and dimensions we are able to show that the random perturbation, although of mean zero, enforces uniqueness of the minimiser. This is joint work with Enza Orlandi (Roma Tre).
10 Apr Euan Spence
University of Bath
Why analysts should care about numerical analysis of the Helmholtz equation
I have spent the last few years using results and techniques developed for the analysis of the Helmholtz equation to address certain questions about the numerical analysis of the Helmholtz equation. Many of these numerical analysis questions can be answered more-or-less immediately using the analysis results, however there are some questions (which I will discuss in this talk) for which the classical analysis results are not sufficient, and more work is required. (Note that absolutely no knowledge of any numerical analysis will be necessary to understand this talk.)
24 Apr Matthias Kurzke
University of Nottingham
The hydrodynamic limit of the parabolic Ginzburg-Landau equation
The Ginzburg-Landau functional serves as a model for the formation of vortices in various physical contexts. The natural gradient flow, the parabolic Ginzburg-Landau equation, converges in the limit of small vortex size and finite number of vortices to a point vortex system. Passing to the limit of many vortices in this ODE, one can derive a mean field PDE, similar to the passage from point vortex systems to the 2D Euler equations with vortex sheet initial data. In the talk, I will present quantitative estimates that allow us to directly connect the parabolic GL equation to the limiting mean field PDE. This is joint work with Daniel Spirn (University of Minnesota).
$\Gamma$-convergence analysis of discrete topological singularities: metastability and dynamics


text:
summaryrefslogtreecommitdiffstats log msg author committer range
path: root/scilab/CHANGES_5.2.X
blob: b1aa72ee889589ed681dcd32fa5ed2737663ef08 (plain)
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231   Changes between version 5.2.0-beta1 and 5.2.0-xxx of Scilab ========================================================== Text editor: ============ * Rename of the item menu "Indent" => "Reformat Selection" (Bug #5219) * Mnemonic added on View ("V") and Document ("D") in the menu bar * Refactoring of some large part of the source code Help browser: ============= * Thanks to a right button click, a popup menu shows the following features: - Execute in Scilab - Edit in the text editor - Copy - Select all - History Localization: ============= * Some strings were untranslatable/untranslated (Bug #4124) Documentation improvements: =========================== * More examples with LaTeX use-cases (colors, etc) Compilation: ============ * Rebuild some C++/Java wrappers with a newer version of SWIG Bug fixes: ========== * bug 5325 fixed - Wrong default path on FileChooser * bug 5111 fixed - Xcos : "Save As" default path is the current file path * bug 4670 fixed - ilib_build examples updated with api_scilab. * bug 5312 fixed - Xcos : adding 'Compile' informations * bug 5099 fixed - Xcos : diagram not visible after a "Fit diagram to view" * bug 4401 fixed - isnum returned wrong values. * bug 4767 fixed - minreal.sci contained a couple of references to the variable 'T', which was not defined in the function. * bug 4844 fixed - The help page for the deletefile function did not specify what is the meaning of the output variable. * bug 5106 fixed - mopen help page did not contain any example. * bug 5107 fixed - mgetstr help page did not contain any example. * bug 5190 fixed - context menus are now available under MacOS * bug 5195 fixed - "get" crashed with "Lycée" toolboxe. * bug 5213 fixed - ATOMS GUI : Module's author(s) was not displayed * bug 5235 fixed - Error message added when launching Scicos * bug 5237 fixed - ATOMS : If the load of an ATOMS toolbox produces an error. The error is now catched. * bug 5251 fixed - getversion help page updated. * bug 5258 fixed - diary help page had some erroneous timestamp prefix formats. * bug 5259 fixed - root_properties help page displayed mis-encoded characters. * bug 5263 fixed - diary returned incorrect path for automatically numbered filenames. * bug 5271 fixed - ATOMS GUI : Frames title was not emphasized * bug 5283 fixed - Intel Fortran 11 compiler did not require to import some settings in Visual Studio. * bug 5286 fixed - calling the 'lib' function with the wrong path made scilab hangs. * bug 5292 fixed - There was a conflict between bool and scilab header mex.h (with Visual Studio and mex files) * bug 5305 fixed - display of filenames used by xcos was wrong (on Windows) * bug 5307 fixed - In Neldermead, inconsistent shape for the input argument x of the cost function. * bug 5308 fixed - editor did not check input argument type. * bug 5326 fixed - graphic_export module was not loaded dynamically. * bug 5330 fixed - "help str1 str2" returned a error. Changes between version 5.1.1 and 5.2.0-beta1 of Scilab ======================================================= Xcos: ===== Xcos is developed simultaneously and together with Scilab, and replaces Scicos in Scilab distributions. With a new ergonomic and efficient block diagrams editor, Xcos provides functionalities for modeling mechanical systems and control systems, and is particularly suitable for industrial and academic needs. This new version provides numerous new features: * Several diagrams can be edited at the same time * Scilab can be used during the diagram construction * Diagram edition is available even during simulation * Drap and drop from palettes to diagram and between diagrams * History (Undo/Redo) with an unlimited number of actions memorized * Viewport to have an overall view of your diagram * Palette window with new palettes organization * Improved stability * Better usability of menus * Tool tips on block * Big diagram managements * Better integration of the demonstrations * Standard shortcuts (Copy/Paste/Undo/Redo/...) ATOMS: ====== ATOMS is the packaging system for Scilab's modules. Thanks to ATOMS, any user running Scilab on a supported operating system is able to install any modules from Scilab or third-party repositories with only three clicks or with just one Scilab command. For example, the following command will install plotlib: atomsInstall("plotlib") This command will: * download the binary package of plotlib from the Scilab repository * unpack the package * configure the package * load the package Many packages are already available and more are going to be offered on Scilab's repositories. This system is fully open to contributors. Anyone can manage his own toolbox on Scilab ATOMS website (http://atoms.scilab.org) or run his own repository. Note that ATOMS website replaces the current toolboxes/modules web interface. Text Editor: ============ A new text editor is implemented in this version of Scilab. The editor now follows the look and feel of Scilab and is integrated into the docking system. The following features are available: * Syntaxic colorization * Automatic indentation * Line numbering * Execute into Scilab * Comment/uncomment of blocks * Go to line Graphics: ========= * Text rendering with LaTeX / MathML The annotation of Scilab's graphics in MathML or LaTeX is now possible. It enables the integration of mathematical equations, greek variables, matrix displays... This is available in any cases where text can be set in the graphic (label, tick, title, xstring...). For example: x = 1:0.25:10;y1 = 1 + sin(4*%pi*x / 10);plot(x,y1,'k-'); xstring(6,1.4,'$\leftarrow f \left( x \right) = 1 + \sin \left( \frac{x \cdot 4 \cdot \pi}{10} \right)$'); See demos => Graphics => LaTeX/MathML Thanks to Calixte Denizet for this feature and the underlying API for LaTeX rendering (project JLaTeXMath) * New features - Antialiasing on graphics This new feature improves the quality of graphic rendering. It can be activated with the following commands: df = gdf(); df.anti_aliasing = "8x"; plot3d(); The rationnal and performance tests are available in SEP #16 or can be requested in Scilab bugtracker as bug #2984. - Add transparency to markdrawing. * 'xbasc' is obsolete. See 'clf' Introduction of new binaries: ============================= The goal of these changes is to improve the capabilities to use Scilab in different environnements and use cases. * Scilab 5.2 introduces new binaries in the distribution: - classical - The GUI application (equivalent to Scilab Standard Mode). This program is exactly the same as in the previous version and all arguments are still available Name: scilab - Advanced Command-Line Interpreter (ACLI) - Interpreter in command line with the graphic capabilities available (equivalent to Scilab NW Mode) Name: scilab-adv-cli - Command-Line Interpreter (CLI) - Interpreter in command line without the graphic or Tcl/Tk capabilities (faster) (equivalent to Scilab NWNI Mode) Name: scilab-cli See SEP #18 for more details * The pipe has been plugged back under all operating systems It is now possible to do: echo "disp(%pi)"|./bin/scilab-adv-cli echo "disp(%pi)"|./bin/scilab-cli echo "disp(%pi)"|./bin/scilab -nw echo "disp(%pi)"|./bin/scilab -nwni * Add error code capability to exit (SEP #19 and request 505). Example: echo "if 1<>2 then exit(99) end"|scilab -nwni; echo $? returns 99 Optimization: ============= * New features - Created neldermead component for simplex-based direct search optimization - Created nmplot component for fast plots of neldermead optimization - Created optimbase component to build optimization algorithms - Created optimsimplex component to build direct search algorithms - Created fminsearch optimization function - Created optimget/optimset to configure fminsearch - Created optimplotfunccount, optimplotfval, optimplotx as plotting functions for fminsearch * Improvements - Added examples in the help of optim for logging feature and optimization based on numerical derivatives Extension capabilities of Scilab (API Scilab): ============================================== In the previous versions of Scilab, there was no clear or easy way to extend Scilab or to use it as an embedded application. Knowing these drawbacks, Scilab 5.2 tackles all those issues by prodiving a new consistent, documented and easy way to use API. * A new API called api_scilab is available. This API provides functions to read/write data from/to Scilab memory. It provides many advantages: - management of all Scilab data types - consistency over all data types - error management - fully documented - fully tested by unitary tests - and it will be maintained over future versions of Scilab Note that all other Scilab API (straight access to the Scilab stack, stack1, stack2 and stack3) will be maintained in the Scilab 5.X family but most of them will be dropped in the 6 family. Do not hesitate to submit a bug report if you would like to see new features and functions in Scilab API. * In the enum sci_types which lists all Scilab data types, the type "sci_lufact_pointer" has been renamed "sci_pointer". A define of "sci_lufact_pointer" on "sci_pointer" has been added to backward compatibilities. The rationale is to improve the use in special case of the pointer data type to avoid memory duplication. * Under all operating systems but Windows, all headers are not installed in a single directory in order to simplify the use of Scilab features in the dynamic link. See SEP #32 for more information * From this version of Scilab, only a defined and documented number of headers are installed. Thanks to this change, a module/toolbox developer knows exactly what are the available functions provided by Scilab. See SEP #35. Do not hesitate to contact us if you have been using a Scilab header which has been removed from Scilab 5.2. call_scilab module: =================== Call Scilab is the API which allows Scilab to be called as computing engine or embedded into a third-party application. From this version, Call Scilab is based on Scilab API and handles all Scilab data types (in previous versions, Double, Boolean, Complex Matrixes and String elements were managed). The Call Scilab function has the same profile as Scilab API with 'Named' into the function name. * CallScilab.h renamed call_scilab.h (See SEP #34). CallScilab.h is still available and points to call_scilab.h * Documentation and examples about call_scilab added (BooleanManagement call_scilab compile_and_run_call_scilab DisableInteractiveMode GetLastJob DoubleManagement ScilabHaveAGraph SendScilabJobs SendScilabJob StartScilab StringManagement TerminateScilab) * Some function profiles in stack3.h provided to manage named variable have been moved in CallScilab.h (please note that we have not changed the ABI and the symbols remain in the core library) The goal of this modification is to separate functions dealing with the call_scilab API and the internal API used in the gateways. Note that all moved functions are considered as obsolete. * In call_scilab, all previous functions available to read/write data from/to the Scilab engine are now obsolete but supported until Scilab 6: * C2F(readmat) is obsolete. Please use readNamedMatrix in api_double.h * C2F(readchain) is obsolete. Please use readNamedMatrixOfString or readNamedMatrixOfWideString in api_string.h * C2F(matptr) is obsolete. Please use readNamedMatrixOfDouble in api_double.h * C2F(creadmat) is obsolete. Please use readNamedMatrix in api_double.h * C2F(creadbmat) is obsolete. Please use readNamedMatrixOfBoolean in api_boolean.h * C2F(creadcmat) is obsolete. Please use readNamedComplexMatrixOfDouble in api_double.h * C2F(creadchain) is obsolete. Please use readNamedMatrixOfString or readNamedMatrixOfWideString in api_string.h * C2F(creadchains) is obsolete. Please use readNamedMatrixOfString or readNamedMatrixOfWideString in api_string.h in api_string.h * C2F(cmatptr) is obsolete. Please use readNamedMatrixOfDouble in api_double.h * C2F(cmatcptr) is obsolete. Please use readNamedComplexMatrixOfDouble in api_double.h * C2F(cmatsptr) is obsolete. Please use createNamedMatrixOfString or createNamedMatrixOfWideString in api_string.h * C2F(cmatbptr) is obsolete. Please use createNamedMatrixOfBoolean in api_boolean.h * C2F(cwritemat) is obsolete. Please use createNamedMatrixOfDouble in api_double.h * C2F(cwritecmat) is obsolete. Please use createNamedComplexMatrixOfDouble in api_double.h * C2F(cwritechain) is obsolete. Please use createNamedMatrixOfString or createNamedMatrixOfWideString in api_string.h * C2F(cwritebmat) is obsolete. Please use createNamedMatrixOfBoolean in api_boolean.h * "make check" now also builds call_scilab examples * An example to call Scilab from C# added. see SCI/modules/call_scilab/examples/call_scilab/NET/C# directory * An example to call Scilab from VB.NET added. see SCI/modules/call_scilab/examples/call_scilab/NET/VB.NET directory Option configuration: ===================== * The file jvm_options.xml has been moved into etc/jvm_options.xml in order to facilitate the use of this configuration file. Mac OS X: ========= * Support of Snow Leopard * Docking system enabled * bug 4087 fixed - Under Mac OS X, an Apple + C shortcut (Ctrl + C) did not work from the console. * bug 4508 fixed - When saving/exporting a figure under Mac OS X, a file could not be created. * bug 4393 fixed - When launching Scilab from the puffin icon, it did not detect the locale and switched to English. * bug 4949 fixed - Using Xcos/Scicos in the source tree environnement, with schema using sundials library, the application had problems to load the dynamic library. toolbox_skeleton: ================= The toolbox skeleton is an example of standard toolbox which shows most of the use cases. * examples of gateways functions (c_sum, f_sum, cpp_find) rewritten with new API. * cleaner added Input/Output functions: ======================= * Input arguments of fprintf are now checked * save / load are now based on the HDF5 file format. The specification of the formats is going to be released in a near future. * Rewrite: + getenv + diary - SEP 23 Core functions: =============== * Rewrite: + mode + predef + type + typename + whereis * 'sethomedirectory' is obsolete. See 'home'. * 'getf' is obsolete. See 'exec'. * toolboxes is obsolete. fileio functions: ================= * Input arguments of functions are now checked (mclearerr, mclose, merror, mget, mgetstr, meof, mopen, mput, mputstr, mseek, mtell) * fileinfo manages column vector of strings (SEP #25) * basename uses fileparts * pathconvert: If the flagtrail argument is set to FALSE and the trailing separator of the path is removed (if present of course). See Bug 4468. * 'getcwd' is obsolete. See 'pwd'. * isfile: checks if filename is an existing file. * movefile: moves files or directory (Request 661) * Rewrite: + copyfile (primitive) + fileparts (primitive) + isdir manages matrix of strings as input argument + basename (primitive) + pathconvert (primitive) + cd, chdir (primitive) Dynamic link: ============= * Windows: temporary files (objects) are generated in an intermediate subdirectory (Release or Debug) ilib_for_link and ilib_gen_Make (with Visual studio) use a same makefile template. (SCI/modules/dynamic_link/src/scripts/TEMPLATE_MAKEFILE.VC) * ilib_for_link and ilib_gen_Make with lcc-win32 use a same makefile template. (SCI/modules/dynamic_link/src/scripts/TEMPLATE_MAKEFILE.LCC) * ilib_verbose (SEP #17) Set level of display returned by dynamic link functions. * add an example to call a Scilab macro from a C interface (see SCI/modules/dynamic_link/examples/interfaces/call_scilab_function directory) * a 'cleaner.sce' file is generated by 'ilib_for_link' and 'ilib_build'. * addinter: each interface added can manage 999 functions (see bug 4675). * ilib_gen_gateway can generate gateway without PutLhsVar (Managed by user, in this case) see help of 'ilib_gen_gateway' about this modification and SCI/contrib/toolbox_skeleton/sci_gateway/c/builder_gateway_c.sce (example) * ilib_gen_loader now generates loaders which can be executed outside the loader's directory * bug 4726 fixed - Under Windows, when the dynamic link was copying the files, in some cases, it was going to copy backup files (for example, sci_luinc.c.bak instead of sci_luinc.c) * bug 4919 fixed - If the source file was stored in TMPDIR, the dynamic link was removing the content of this file. Online Help: ============ * Sub-chapters are now allowed (See SEP #24) * xmltochm exports help to chm format (Windows) * add_help_chapter now accepts string array as input argument: consequently, several online help chapters can be added at the same time. * add_help_chapter now accepts to add help chapters with the same title. * In the documentation, the font size of the equations has been increased for a better readability. * Javasci FAQ page added * Online help XML files have been converted into UTF-8 Source reorganization: ====================== * Makefile.incl.mak (Windows, dynamic link) moved from SCI directory to SCI/modules/src/scripts * newest, get_absolute_file_path, getrelativefilename moved from io to fileio. * bug 3668 fixed - formatnumber.f, dmdsp.f, ... moved in output_stream module. * printf, msprintf, mprintf, print moved in output_stream module. * disp moved in output_stream module. * bug 3668 fixed - lib, deff, getf, exec, execstr moved in functions module. * oldsave, oldload functions (only used with macros of Scilab 2.4) are removed Replaces oldsave, oldload by save and load in your code. * bug 3669 fixed - integrate, intc and intl moved in Differential equations interp1, interp2d and splin2d moved in the Interpolation module. * libs/MALLOC/src/malloc.c is no longer build (used to be built for 64 bits archs). Note that if Scilab is built on a 64 bits and triggers a seg fault on startup, uncomment the related line in libs/MALLOC/Makefile.am and launch autoreconf. Compilation: ============ * Visual studio uses default runtime library /MD (msvcrt.lib) to build all libraries of Scilab. * Scilab on Windows built with Intel Fortran 11.0.061 and Intel C++ 11.0.074 * Symbols in dlls are explicitly exported on Windows. In previous versions of Scilab all symbols were exported. * modelicac (Xcos/Scicos) built with Ocaml 3.11.0 on Windows * blas, lapack, arpack libraries moved as pre-requirements (Windows) * blas, lapack libraries moved as pre-requirements (Linux/Unix/Mac OS X) * lapack 3.2 used on Windows * functions module is dynamically loaded by Scilab. * autoconf updated to version 2.64 * automake updated to version 1.11 * libtool updated from version 1.5.26 to 2.2.7a (Closes bug #4279) with some patches for Mac OS X/Darwin support * --enable-debug-java add two options to the JVM args (-verbose:jni and -Xcheck:jni) in order to provide more feedbacks on debug Note that this should not be used into a binary since it is expensive * C++ => Java connector updated (using GIWS - http://www.scilab.org/giws/ version 1.0.5) There was a bug in GIWS: The use of a static method returning an int was not calling the right method. It did not seem to trigger any errors in the past but the latest version of the JDK is now complaining. * Patches applied (see bugs #4506, #4517 & #4588) by Dan McMahill. They fix some compile time problems under NetBSD which also improve all operating systems but Windows. - adds some missing$host to the 64 bit list. - adds a needed compiler flag for alpha-*-netbsd - adds autoconf check for term.h header - adds autoconf checks for gettext - adds autoconf check for dlopen in -ldl (on some systems, we do not need -ldl because dlopen is in libc). Do not hardcode linking with -ldl but rely on this new check. - adds correct getrlimit() argument for NetBSD and DragonFly - avoids pulling in an OSF1 specific header on NetBSD/alpha - adds missing newline at the end of a file - adds missing XML LIBS and CFLAGS - adds LTLIBINTL to the list of common objects needed for linking the top level binary. - adds checks for term.h and termcap.h headers. - adds check for -lpthread - reworks the checks for curses a little bit to search for curses.h and -lcurses first followed by ncurses.h and -lncurses. - uses configure results to protect the inclusion of curses.h, ncurses.h, term.h, and termcap.h. - adds __DragonFly__ to a few conditional lines. - removes the static declaration of BC to match what was found in a header file. - adds missing enable_keypad_mode() - uses configure results to protect the inclusion of curses.h, ncurses.h, term.h, and termcap.h. - Large amounts of cleanup of the PVM configure code (Closes: #4151) * Improve detection of build/run environment under GNU/Linux Debian under arm, armel, mips & mipsel tests: ====== * test_run() now accepts Sub-Modules (See SEP #31) Internationalization: ===================== * Portugues do Brazil localization added (Thanks Daniel de Souza Grilo and others) * Japanese localization added (Thanks Hiroshi Saito) * Italian localization added (Thanks Carmelo Leggio) * More help pages translated to Portugues do Brazil (Thanks Daniel de Souza Grilo) * Catalan localization added to Scipad (Thanks Oriol Gonzalez) * Japanese localization added to Scipad (Thanks Hiroshi Saito) Bugs: * bug 2627 fixed - Scilab 5 console retrieved input strings in UTF-8 format and Scilab did not manage this format but ISO-8859. * bug 3228 fixed - ascii function was broken for extended set (example: ascii('é')). * bug 3433 fixed - Length with a UTF string returned an incorrect size * bug 3472 fixed - Dropping files into Scilab shell did not work when the path contained accented characters. * bug 3666 fixed - 'input' returned accented characters. * bug 3701 fixed - "Error during call to UTFToLocale: No such file or directory" on Windows. * bug 3839 fixed - strrev() did not work correctly if the string to be reversed included some accented characters. * bug 4003 fixed - setenv & getenv did not manage utf string on Windows. * bug 4012 fixed - Display of month and week were wrong in sessions starts and ends (history manager). * bug 4019 fixed - With -nw or -nwni mode on Windows, console returned error about localization. * bug 4068 fixed - Accented names in directories were not supported. * bug 4145 fixed - Simplified Chinese file names were not shown properly. * bug 4233 fixed - exec command with a UTF filename failed. * bug 4277 fixed - strsubst,regexp, strindex, grep returned strange results if accented characters and character class were associated in the pattern to match. * bug 4617 fixed - Some items (Console pull down menu and help browser item) were not translatable * bug 4660 fixed - Error in the French localization (Edit instead of Edition) * bug 4758 fixed - Embedded version of autoconf libs.m4 were causing some issues * bug 4768 fixed - strsplit returned strange results with accented characters * bug 4915 fixed - The default font in some of the uicontrols applications in Scilab were not handling correctly for the Japanese and others languages. This was happenning with m2sci and the demos browser. * bug 5071 fixed - isletter("é") returned [%F %F] instead of %F. * bug 5072 fixed - strspn("aéio","éa") returned 3 instead of 2. String manipulation: ==================== * Rewrite: + strsplit - SEP #26 * 'NumTokens' is obsolete. See 'tokens'. Java/Scilab API: ================ - uses api_scilab functions to write & read data (internal for javasci) - SciInteger class added Functions removed: ================== * lgfft (See bug #4600) Linear algebra: =============== * Clarified documentation for lu function. Elementary functions: ===================== * 'sort' is obsolete. See 'gsort'. TCLSCI interface: ================= * 'tk_getdir' is obsolete. See 'uigetdir'. * 'tk_savefile' is obsolete. See 'uiputfile'. GUI interface: ============== * 'x_message_modeless' is obsolete. See 'messagebox'. Bug fixes: ========== * bug 336 fixed - pspect and cspec help pages improved * bug 415 fixed - Order in the roots of a polynomial fixed * bug 667 fixed - scilab.start-file caused an initialization error when you used predef('all') in a user startup file. * bug 1412 fixed - A(3,3)=%s,A(:)=%z caused Scilab to hang * bug 1451 fixed - theta, alpha, leg, flags as optional named arguments for hist3d set * bug 1628 fixed - With long programs (several hours) a negative value for timer() was get * bug 1776 fixed - funcprot accepted non-integer arguments * bug 1809 fixed - Warning message (figure_size) after an invalid graphical script added * bug 1885 fixed - histplot starts from %eps rather than 0 to avoid logarithmic trouble. * bug 2042 fixed - copy function altered axes properties. * bug 2043 fixed - The function copy applied to an axis handle did not work * bug 2238 fixed - Function returned a wrong error * bug 2275 fixed - isvector help page added * bug 2347 fixed - "fun2string" indentation problem with select/case instruction. * bug 2446 fixed - "while" documentation help page improved to explain that the keywords do or then can be ommitted. * bug 2453 fixed - mfscanf and probably the other variants msscanf mscanf could crash Scilab when first argument was -1 (any number of lines) * bug 2509 fixed - execstr forgot to store the function name and line number when in the errcatch mode * bug 2537 fixed - xstring feature improved * bug 2570 fixed - LCC did not work with some "stk" ref on some old toolboxes. * bug 2649 fixed - diary() function could not be nested. * bug 3131 fixed - a glibc >= 2.4 was mandatory (causing Scilab to fail under Debian Etch, Centos 4.X and some other old operating systems) * bug 3184 fixed - Ticks of colorbar have disappeared * bug 3201 fixed - Help page for the function del_help_chapter added * bug 3264 fixed - More explicit message when too many files have been opened added. * bug 3422 fixed - The keyword for history search was not updatable * bug 3488 fixed - Dynamic link functions can now handle Fortran 90 code. * bug 3533 fixed - lib(dir_path) did not work if the final slash was missing in dir_path. * bug 3537 fixed - Problem with examples in French help page for metanet functions. The old graph data structure was used. * bug 3543 fixed - Wrong parenthesize in struct indices (code generated by tree2code). * bug 3580 fixed - A gateway declaration containing a false primitive ID or gateway ID crashed Scilab. * bug 3612 fixed - History manager did not work at startup * bug 3660 fixed - font_angle was lost on the axis label when exporting through xs2pdf - Thanks to Paul Griffiths for the patch * bug 3772 fixed - Input argument of 'predef' was not correctly checked. * bug 3773 fixed - 'ans' was protected with predef('all'). * bug 3884 fixed - chdir, getcwd, pwd moved from core to fileio module. * bug 3923 fixed - diary() function produced bad files when it tried to record interactive commands. * bug 3953 fixed - delete() always set the current entity to the parent of the deleted entity. * bug 3980 fixed - Wrong line number in error message * bug 3992 fixed - Some invalid dependencies on external libraries removed. * bug 4030 fixed - unix_w('dir /s') could display strange matrix on Windows. * bug 4090 fixed - Draw did not work any more while inside drawlater/drawnow scope. * bug 4101 fixed - -ns option was not clearly explaining that it is disabling many Scilab features * bug 4110 fixed - Demos order were different between Linux and Windows versions * bug 4181 fixed - AdCommunications help page removed * bug 4184 fixed - Style of the examples corrected * bug 4217 fixed - gsort sorted complex by magnitude only with 'g' and not support 'r', 'c', 'lr', 'lc' * bug 4222 fixed - Documentation page on fromc and fromjava added * bug 4232 fixed - Problem in the Java detection with GNU/Linux under PowerPC fixed * bug 4262 fixed - Lines returned incorrect values. * bug 4263 fixed - Completion cleaned current input line. * bug 4267 fixed - A non-initialization of a lock under Netbsd was causing an error on startup * bug 4277 fixed - Force UTF8 management in pcre processing. * bug 4278 fixed - typename() called with a wrong number of input arguments returned incoherent errors. * bug 4298 fixed - ilib_for_link failed with lcc-win32 (Windows). * bug 4304 fixed - Fail to build with ./configure --without-gui * bug 4307 fixed - Desactivate (in modules.xml) modules if their functionnalities are not available. * bug 4307 fixed - Help file for %io added * bug 4330 fixed - stacksize('max') + stacksize(required_mem) did not work * bug 4347 fixed - messagebox(): buttons were displayed in reverse order with respect to their order in the vector specifying them (Windows). * bug 4351 fixed - Test about 'exit' did not work on Linux. * bug 4358 fixed - Changing defaultstacksize in scilab.start did not work * bug 4360 fixed - The reference of bug_3954.tst was missing * bug 4364 fixed - stacksize('max') + stacksize(required_mem) did not work * bug 4365 fixed - Completion failed on a wrong path * bug 4369 fixed - Help for text_properties: For the clip_state attribut, the second possible value was 'clipgrf' instead of 'cliprf' * bug 4378 fixed - The gamma function did not work properly with large numbers under Linux 64 bits * bug 4379 fixed - If the thickness property (of plot3d for example) was set to 0, the lines/edges could disappear * bug 4380 fixed - diary(0) without an initialization of diary crashed Scilab * bug 4380 fixed - Help page of the printf command had a problem * bug 4380 fixed - Merror error codes documented * bug 4385 fixed - the param3d_properties page has been removed, but a lot of links to this page existed in the documentation. * bug 4386 fixed - Dynamic link: link('show') displayed only one library if we had only one symbol. * bug 4391 fixed - make install-html (when the option --with-install-help-xml was added to the configure) was not installing MathML sources * bug 4394 fixed - 'origin' as position for X and Y axes added * bug 4395 fixed - Incorrect descriptions of the axesflag and nax parameters in the plot2d help page. * bug 4396 fixed - In Plot2d, the nax option could receive -1 for number of ticks, which meant autoticks * bug 4403 fixed - ieeefp.h was not included under Solaris in evaluate_expr.c isinf was defined (when not provided by the system) with a return * bug 4407 fixed - Help file scilab_xx_XX_help.jar had another scilab_xx_XX_help.jar embedded and not valid. * bug 4409 fixed - Fortran optim subroutines used fwrite (fortran) and not basout as standard output * bug 4414 fixed - Complex grayplots were not saved correctly in Scilab 5.1 * bug 4421 fixed - Completion failed on some relative path. * bug 4426 fixed - uigetfile() - File name was cut when we were in the root directory. * bug 4428 fixed - Function compute_initial_temp could not handle functions with several arguments * bug 4429 fixed - Use hidden_axes instead of hidden_axis * bug 4430 fixed - Incorrect description of the margins property in the axes_properties help page. * bug 4431 fixed - xsegs() accepted z argument * bug 4433 fixed - Problem using optim. In some cases, the optim function made Scilab hung. * bug 4437 fixed - Exporting an empty figure crashed Scilab. * bug 4438 fixed - Completion did not support insert mode. * bug 4439 fixed - Unexpected complex conjugates when using cat. * bug 4459 fixed - grayplot did not always plot map containing %nan. * bug 4461 fixed - Redefined prompt not displayed in a diary. * bug 4463 fixed - Creating an one-colored Sgrayplot generated some exceptions and did not plot anything. * bug 4466 fixed - .' operator defined for strings and booleans * bug 4467 fixed - getshortpathname,getlongpathname did not manage string matrix as input * bug 4468 fixed - pathconvert(,%F) could remove last trailing separator. * bug 4469 fixed - getmd5() & mopen hung if there were called with an existing directory as input argument and not a filename (Linux) * bug 4474 fixed - Help of 'fort' was obsolete. * bug 4474 fixed - addinter help had no example. * bug 4479 fixed - A few minor bugs were causing the configure to fail under FreeBSD (Thanks to OtacÃlio de AraÃºjo Ramos Neto) * bug 4483 fixed - Handle FreeBSD Java detection * bug 4486 fixed - When a file had been opened for execution with "File/Execute..." menu, its pathname was lost. * bug 4489 fixed - oldsave and oldload removed. * bug 4491 fixed - get() with wrong argument causes EXCEPTION_ACCESS_VIOLATION error. * bug 4492 fixed - output_stream_gateway.xml was not include in Windows binary. * bug 4495 fixed - exec did not check second and third input arguments. * bug 4496 fixed - in tbx_build_gateway help page, ismex parameter was not documented. * bug 4497 fixed - xmltoformat got stuck in directories beginning with '.'. * bug 4498 fixed - merror() returned weird strings if called before opening files. * bug 4499 fixed - basename returned a wrong value if file or a directory started with a dot * bug 4500 fixed - basename('') returned a error * bug 4501 fixed - mput() no more allowed integer types as first input argument. * bug 4507 fixed - Depending on the Fortran runtime libraries a dummy main definition was needed. * bug 4514 fixed - valgrind.supp was not installed * bug 4515 fixed - Linking and loading some external functions already used crashed Scilab * bug 4516 fixed - ilib_for_link did not use ilib_gen_loader but an internal function. * bug 4518 fixed - ilib_build with a column vector of strings as filenames did not work on Linux * bug 4522 fixed - The Tcl interpreter initialization code made use of some uninitialized variables * bug 4525 fixed - scilab.sln and scilab_f2c.sln did not apply same dependencies on libraries (Windows) * bug 4528 fixed - makefile (Windows) generated by ilib_for_link forced to rebuild all files each time * bug 4530 fixed - Leg labels curves were in reverse order * bug 4533 fixed - Link failed on some path (Windows) * bug 4539 fixed - Some optional parameters were not set in hist3d * bug 4542 fixed - Unexpected interpretor warning * bug 4546 fixed - Error message added for linpro function (moved to an external function) * bug 4547 fixed - Examples of javasci with graphics were no more interactive * bug 4548 fixed - With Intel Fortran, file unit opened in a external dll were not shared * bug 4551 fixed - Menus could return an error in GUI mode (error 2 Invalid factor) * bug 4552 fixed - c++ comments in stack3.h had been translated into c comments * bug 4564 fixed - Unable to edit matrices using x_mdialog function * bug 4573 fixed - core.start tried to load add_module_help_chapter even if it did not exist * bug 4574 fixed - ilib_build did not check if library was already loaded in Scilab * bug 4580 fixed - rpem documentation made more accurate * bug 4584 fixed - Under Windows, home value was wrong * bug 4585 fixed - Scilab failed to build with Intel C++ compiler 11.0.074 on Windows * bug 4586 fixed - Function fieldnames added for getting tlist, mlist and struct field names (see SEP #28) * bug 4592 fixed - The ged entity picker produced an error if a menu had been added to the graphic window * bug 4596 fixed - g_margin failed to return the gain margins in some cases * bug 4600 fixed - Missing function inside lgfft (lgfft needed be removed) * bug 4601 fixed - Hidden functions and missing help for vec2list list2vec aplat and recons * bug 4603 fixed - Unknown function lst2tree called by function mtlb_eval (+ some other problems fixed in mtlb_eval) * bug 4604 fixed - rmdir(,"s") did not work if it contained a hidden file (starting with a dot) * bug 4605 fixed - basename('') returned a error * bug 4606 fixed - Example of 'link' in help did not work * bug 4608 fixed - get_function_path returned a non-consistent path * bug 4611 fixed - what function did not return a complete list of functions * bug 4612 fixed - The graphic export used to consider .jpeg as an invalid extension * bug 4614 fixed - On some (rare) archs/OS, File -> Export on a graphic could led to a crash * bug 4615 fixed - xs2jpg(0, '/tmp/myplop.jpeg'); was creating a file called /tmp/myplop.jpeg.jpg (Thanks to Guilherme Kunigami for the fix) * bug 4616 fixed - Text strings in SVG output were not rotated. Thanks to Paul Griffiths for the patch! * bug 4618 fixed - buttmag produced a warning because of redefining symbol sample * bug 4620 fixed - the setenv function made scilab hung. * bug 4626 fixed - When using the CLI version, completion made Scilab crashed * bug 4627 fixed - The function matfile2sci did not manage 7.x format * bug 4630 fixed - Problem with the Xcos/Scicos block affich * bug 4635 fixed - Bad title in the French help of the graphic module * bug 4636 fixed - Metanet on-line help: an accent was missing on the "e" in the French version * bug 4638 fixed - This example with optim freezed Scilab * bug 4639 fixed - Some graphics demos did not contain the menu item "show code" * bug 4641 fixed - The parameter Q of the function derivative was not clear * bug 4645 fixed - French 'gsort' help had some wrong information * bug 4646 fixed - Assigning a string to an element of a matrix of numbers did not give an error * bug 4650 fixed - SCI/modules/graphics/macros/Sfgrayplot.sci had not been modified for localization * bug 4654 fixed - Max of an empty sparse matrix made Scilab hung * bug 4656 fixed - part(input_matrix,[]) always returned a single string even if input_matrix had a several dimensions * bug 4658 fixed - For graphics macros from adddcolor to getfont and all colormap * bug 4666 fixed - SCIHOME was not well defined if Scilab had been launched in another Scilab session * bug 4676 fixed - diary() removed whitespaces characters from the output of mprintf() * bug 4683 fixed - There was no example of the use of tlist in the dedicated page * bug 4684 fixed - printf(), mprintf, msprintf did not properly deal with -%inf * bug 4688 fixed - listfiles("/") returned an error * bug 4689 fixed - diary() did not report interactive commands into the output file * bug 4695 fixed - Some help pages + examples were missing in the arnoldi package * bug 4702 fixed - On some cases, dos(cmd) did not return results * bug 4707 fixed - Could not save a Xcos/Scicos diagram to a non-existing file under Mac OS * bug 4709 fixed - The set function with 2 parameters and no handles made Scilab hung * bug 4710 fixed - Error with C++ interface which uses the function CreateVar * bug 4712 fixed - By GUI handle affectation produced an error * bug 4719 fixed - fsolve might failed on some system of equations. An example in the documentation was added * bug 4724 fixed - When the f variation of a data set was too small, plot hung * bug 4727 fixed - The function 'length' did not return the same value in Scilab 5.1 and Scilab 4.1.2 * bug 4728 fixed - The function 'strcat' did not return the same value in Scilab 5.1 and Scilab 4.1.2 * bug 4732 fixed - The help page of function ss2ss had some missing part * bug 4737 fixed - Completion failed on file extension search * bug 4744 fixed - whereis, librairieslist, libraryinfo primitives moved in "functions" modules * bug 4750 fixed - Error boolean catenation * bug 4752 fixed - ci2exp produced erroneous code when applied to boolean matrices (; are missing) * bug 4753 fixed - If you had a toolbox and you launched scilab-cli, you had an error message at startup * bug 4759 fixed - Better error message in nlev when called with no input argument provided. * bug 4770 fixed - modules::renderer::utils::ColorMap::isValidScilabIndex test was wrong * bug 4773 fixed - Using "axes_reverse" produced a switch between the front and back color of a figure * bug 4789 fixed - Number of input arguments was not checked in ilib_functions (dynamic_link module) * bug 4792 fixed - Macro name too long * bug 4795 fixed - CallScilab.h renamed call_scilab.h * bug 4797 fixed - macro make_help_index.sci (internal) removed (not used in Scilab 5.x) * bug 4798 fixed - pathconvert macro rewritten as a primitive (many times used and not faster) * bug 4807 fixed - strsubst did not check if second argument was a valid patter where fourth argument was 'r' * bug 4810 fixed - gsort did not manage sparse vectors as sort * bug 4811 fixed - For some figures, it was not possible to save and load the handle of the figure * bug 4812 fixed - xs2... function did not work if the first argument was a handle * bug 4816 fixed - plot did not manage autoclear correctly * bug 4817 fixed - macro savedefaultbrowser (internal) removed (not used in Scilab 5.x) * bug 4826 fixed - The type of the 'dims' entry of an hypermat was not always the same * bug 4828 fixed - Completion cleared the content of some completed path * bug 4832 fixed - wavread returned a non explicit error if RIFF had some 'smpl' chunck * bug 4838 fixed - Completion returned wrong value with '..' * bug 4846 fixed - mopen("","") crashed on Windows * bug 4853 fixed - C,C++ dlls generated by Scilab had a dependency on fortran runtime (Windows) * bug 4855 fixed - Standard error messages added when setting/getting values from graphics handles * bug 4880 fixed - Query-replace with a regular expression doesn't work in editor * bug 4904 fixed - wrong localized fr_FR message * bug 4917 fixed - fileinfo(SCI+'/') returned [] (under Windows) * bug 4918 fixed - Error message returned by 'get_absolute_file_path' was incorrect * bug 4925 fixed - Verbose option of the optim function crashed on Windows * bug 4926 fixed - Could not save a structure in a MAT-file using savematfile * bug 4927 fixed - When the user tried to plot some data in semilogx or semilogy, a blank plot windows was displayed * bug 4928 fixed - x_mdialog crashed when more default valued than labels * bug 4943 fixed - execstr did not check input arguments * bug 4944 fixed - If the extension is not provided, some functions adds the extension, some others don't. * bug 4961 fixed - missing some field when printing some graphics Handle * bug 4964 fixed - set or get 'format_n' property from an axis crashed Scilab * bug 4966 fixed - execstr([]) return [] * bug 4974 fixed - exec('') crashed Scilab * bug 4983 fixed - When Scilab was started in nw mode, the addmenu examples were failing with a weird error message * bug 4991 fixed - No check if there was modification when doing "Execute Into Scilab" in the editor * bug 4997 fixed - Now Scilab editor and Xcos, ask to save unsaved documents when the users close Scilab. * bug 5026 fixed - now palette browser appears only with a new diagram or by the menu View->Palette browser. * bug 5033 fixed - The Demo CACSD / Inverted pendulum was broken. * bug 5042 fixed - (1|[1,0,1;1,1,0]) returned a wrong result. * bug 5074 fixed - French help star showed mis-encoded characters. * bug 5081 fixed - demo "Signal Processing" --> "Spectral Estimation" failed (on Windows) * bug 5105 fixed - completion: cd "..\L did not work. * bug 5138 fixed - ilib_build: if the "makefile name" argument is an empty matrix, the generated Makefile is ".mak" * bug 5148 fixed - Setting {x,y,z}_ticks with empty value work. * bug 5155 fixed - Scilab windows 32 bits version required CPU SSE 2 instructions. * bug 5158 fixed - Region to SuperBlock now keep links breaks inside and outside SuperBlock * bug 5160 fixed - When a graphic has exported by the 'File -> export' menu, and did not specify any 'filter', scilab crashed. * bug 5188 fixed - A function to reopen a parent diagram was added in the pop up menu of the diagram. * bug 5210 fixed - editor("SCI/etc/scilab.start") freezes Scilab. * bug 5224 fixed - Maj+Tab modify the text selection. * bug 5269 fixed - Missing feature in the Text Editor: Ctrl-F1 to open Scilab's help * bug 5270 fixed - In editor, change the shortcut for the line numbering (CTRL+L) and assign it to "Load into Scilab" in order to match the old behavior. * bug 5281 fixed - The menu "View->"Palette Browser" is correctly checked at Xcos start. * bug 5284 fixed - Function "legend" now draws line segments in its box in a corect order. * bug 5290 fixed - Remove function editorHighlightLine, and update editor in order to have in argument files to open and lines to be highlighted for each files.


text:
## 2-D Continuous Wavelet Transform App

The 2-D continuous wavelet transform (CWT) app enables you to analyze your image data and export the results of that analysis to the MATLAB® workspace. The app provides all the functionality of the command line functions `cwtft2` and `cwtftinfo2`. Access the 2-D CWT app in the apps gallery by selecting Wavelet Design & Analysis in the Signal Processing and Communications section or entering

`cwtfttool2`

at the MATLAB command prompt.

### 2-D Continuous Wavelet Transform

The 2-D continuous wavelet transform is a representation of 2-D data (image data) in 4 variables: dilation, rotation, and position. Dilation and rotation are real-valued scalars and position is a 2-D vector with real-valued elements. Let x denote a two-element vector of real-numbers. If

`$f\left(x\right)\in {L}^{2}\left({ℝ}^{2}\right)$`

is square-integrable on the plane, the 2-D CWT is defined as

`${\text{WT}}_{f}\left(a,b,\theta \right)={\int }_{{ℝ}^{2}}f\left(x\right)\frac{1}{a}\overline{\psi }\left({r}_{-\theta }\left(\frac{x-b}{a}\right)\right)\text{\hspace{0.17em}}dx\text{ }a\in {ℝ}^{+},\text{ }\text{\hspace{0.17em}}x,b\in {ℝ}^{2}$`

where the bar denotes the complex conjugate and rθ is the 2-D rotation matrix

`${r}_{\theta }=\left(\begin{array}{cc}\mathrm{cos}\left(\theta \right)& -\mathrm{sin}\left(\theta \right)\\ \mathrm{sin}\left(\theta \right)& \mathrm{cos}\left(\theta \right)\end{array}\right)\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{ }\theta \in \left[0,2\pi \right)$`

The 2-D CWT is a space-scale representation of an image. You can view the inverse of the scale and the rotation angle taken together as a spatial-frequency variable, which gives the 2-D CWT an interpretation as a space-frequency representation. For all admissible 2-D wavelets, the 2-D CWT acts as a local filter for an image in scale and position. If the wavelet is isotropic, there is no dependence on angle in the analysis. The Mexican hat wavelet is an example of an isotropic wavelet. Isotropic wavelets are suitable for pointwise analysis of images. If the wavelet is anisotropic, there is a dependence on angle in the analysis, and the 2-D CWT acts a local filter for an image in scale, position, and angle. The Cauchy wavelet is an example of an anisotropic wavelet. In the Fourier domain, this means that the spatial frequency support of the wavelet is a convex cone with the apex at the origin. Anisotropic wavelets are suitable for detecting directional features in an image. See Two-Dimensional CWT of Noisy Pattern for an illustration of the difference between isotropic and anisotropic wavelets.

### 2-D CWT App Example

This example shows how to analyze an image using the 2-D CWT app.

Load the triangle image in the MATLAB workspace.

`imdata = imread('triangle.jpg');`

Launch the 2-D CWT app by selecting Wavelet Design & Analysis in the Signal Processing and Communications section of the apps gallery. From the 2-D section, select Continuous Wavelet Transform 2-D. Alternatively, enter

`cwtfttool2`

at the MATLAB command prompt.

Select File –> Import Data to import the `imdata` variable.

From the `Wavelet` drop down menu, select the cauchy wavelet.

For the Angles and Scales, select the Manual option.

Click Define to specify a vector of angles. Select Manual from the `Type` drop-down list and specify a vector of angles from 0 to `7*pi/8` radians in increments of `pi/8` radians, `0:pi/8:(7*pi)/8`. Click Apply to apply your choice of angles.

Click Define to specify a vector of scales from 0.5 to 4 in increments of 0.5. Select Linear from the `Type` drop-down list. Set First Scale equal to 0.5, Gap between two scales equal to 0.5, and Number of Scales equal to 8. Equivalently, you can select Manual from the `Type` drop-down list and specify the vector of scales as `0.5:0.5:4`. Click Apply to apply your choice of scales.

Click Analyze to obtain the 2-D CWT.

Set the `Index of Scale` to be 1 and click More on Angles. Click Movie to step through the manually-defined angles for the 2-D CWT coefficients at scale 0.5.

Select File –> Export Data –> Export CWTFT Struct to Workspace to export the analysis to the MATLAB workspace. You can find an explanation of the structure fields in the function reference for `cwtft2`.

Get trial now


text:
# Input and Output SNR Calculation in AM receiver input and output

For the FOM calculation of an AM receiver, the input and output signal powers are respectively, $$P_{in} = \frac{A_c^2(1 + k_a^2P_m)}{2}$$ $$P_{out} = k_a^2A_c^2P_m$$ These are obtained from the input and output expressions for the receiver as given by, $$x(t) = A_c(1 + k_am(t))\cos(2\pi f_ct) + n_c(t)\cos(2\pi f_ct) - n_s(t)\sin(2\pi f_ct)$$ $$y(t) = k_aA_cm(t) + n_c(t)$$ where $$n_c(t)$$ and $$n_s(t)$$ are the in phase and quadrature components of the complex noise envelope, and the output is obtained via envelope detection. Now, while calculating output noise power, we multiply the PSD of $$n_c(t)$$ with the bandwidth. So, $$P_{noise,out} = 2N_0W$$ because $$n_c(t)$$ has a PSD of $$N_0$$ spread out in a frequency range of $$-W$$ to $$W$$. This gives us the SNR of output as, $$SNR_{out} = \frac{k_a^2A_c^2P_m}{2N_0W}$$ Now, in the literature, as in Wikipedia for instance, (link below) the input SNR is, $$SNR_{in} = \frac{A_c^2(1 + k_a^2P_m)}{2N_0W}$$ which corresponds to $$P_{noise,in} = N_0W$$ Now, it is my understanding that the input noise is a bandpass AWGN noise with a double sided PSD of $$\frac{N_0}{2}$$ spread out in a frequency range of $$f_c - W$$ to $$f_c + W$$ and $$-f_c - W$$ to $$-f_c + W$$, which then should correspond to a noise power of $$2N_0W$$. But it seems that the negative frequencies have not been accounted for while calculating input noise power. Where am I going wrong here?

• For the formula for $x(t)$, shouldn’t there be a sine term after $n_s$? – Dan Boschen Nov 28 '18 at 14:12