Hello everyone.
I am trying to do a 2D Shannon interpolation, but I cannot use a sinc because later on this expression goes in an optimization software that doesn't recognize it. I have defined my own version of sinc as:
sincC = Piecewise[{(Sin[Pi* #]/(Pi*(#))), # >= 1}, {1 - (#^2)/6 +...
Don't worry. In the end, I found out a way to do it using Shannon sampling in two dimensions. However, I am running in some issues, but I think they deserve their own thread
The thing is that I cannot use piecewise interpolation, the result goes then into ampl, an optimization software (in which I am calculating the fastest route) which needs to know the value of the windspeed at all points. I need an algebraic expression of the windspeed, in this case, my f(x,y)...
First of all, thanks for the answer.
Second, my data doesn't have noise, since the data is the output of a prediction model (I don't know anything about it's internal working, only the output file), so I will try the lineal way instead.
About the use of interpolation instead of the fit, I do...
Hello everyone.
I have a vector of size 300321*3; the columns are X position, Y position and recorded data; I need to find the interpolation polynomial. I have acess to mathematica, matlab and python.
I have attempted to use a NonlinearModelFit in mathematica, but I cannot achieve a Rsquared...
Hello everyone. I am currently using the pca function from matlab on a gaussian process. Matlab's pca offers three results. Coeff, Score and Latent. Latent are the eigenvalues of the covariance matrix, Coeff are the eigenvectors of said matrix and Score are the representation of the original...
Greetings everyone.
I have generated a gaussian random process composed of 500 realizations and 501 observations. The used random variables are gaussian normal.
I have then applied the pca analysis to that process (Mathwork's help). However, if I plot the histograms of the coeffs I don't find...
Hello.
I have designed a Gaussian kernel as:
[X,Y] = meshgrid(0:0.002:1,0:0.002:1);
Z=exp((-1)*abs(X-Y));
Now, I calculate PCA:
[coeffG, scoreG, latentG, tsquaredG, explainedG, muG]=pca(Z, 'Centered',false);
I can rebuid the original data propperly as defined in the dcumentation...
Hello everyone.
I am trying to generate the KL expansion of a stochastic process. I use a Monte Carlo sampling method to generate the process, which involves two random variables and I compare it with it's theoretical mean for 50 values of time and they look quite similar. Then, I calculate the...
Hello everyone.
I am trying to create a matrix in Matlab with two columns which should look like as follow:
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9...
0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1...
Has anyone programed something like this before?
Hello everybody.
Recently I have been given a series of archives which contain a series of measurements and the dates in which they were measured. The problem is that this format is the time which has happened in hours since 1900-01-01 at midnight. Can someone tell me how can I find out how to...
Hello everyone.
The Legendre polynomials are defined between (-1 and 1) as 1, x, ½*(3x2-1), ½*(5x3-3x)...
My question is how can I switch the domain to (1, 2) and how can I calculate the new polynomials.
I need them to construct an estimation of a random uniform variable by chaos polynomials...
Hi everybody.
In Python there is a library called chaospy. One useful command is cp.orth_ttr which generates a polynomial expansion, e. g. a series of orthogonal polynomials or orders zero, one, two... for a random variable e.g normal, uniform...
For more information see...
Indeed it does. Thank you.
I only have one question left. Since I am working with a random variable, what shoud I use as f(x)? if I used the expected value, I would get a zero, since I am dealing with a uniform random variable.
I apologize if I haven't expressed myself propplerly.
Here it is the full code:
import chaospy as cp
import numpy as np
import odespy as od
import matplotlib.pyplot as plt
np.set_printoptions(threshold=1000,edgeitems=1000)
def s(t, v0):
return v0*t
v0 = cp.Uniform(-1,1)
#a = cp.Beta(2,2)
#v0...
Hello everyone. I have a Python code which calculates, given a continuos uniform random variable U(-1,1), the order of a interpolation polynomial and a set of points the evolution of a function of this random variable. i.e.
v0 = cp.Uniform(-1,1)
t = np.linspace(0, 10, 10)
order=1
.
.
.
plt.plot...