Réponse apportée
FFT of coupled oscillator from time domain (picosecond) to frequency domain (wavenumber, cm-1)
HI Kunjanni, this occurs because the fft contains both positive and negative frequency (wavenumber) components. Zero frequency...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Exponential function produces error with integrate command
Hi Ben for large x, exp(x) overflows to infinity before the exp(-(x.^2)/2) factor has a chance to bring in down. Try completin...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Even distribution of coordinates subset
Hi Giovanni, here is one method, which assumes that B is supposed to span basically the entire domain of A. Suppose the set of...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Why does pcolor require you to transpose the matrix when you give it x and y vectors?
Hi Darcy. pcolor works in the same fashion as meshgrid, and creates a grid with nx = length(x) columns and ny = length(y) rows....

environ 5 ans il y a | 0

Réponse apportée
Undefined function 'sinc' for input arguments of type 'double'.
Hi boutaina, Since it's easy in Matlab to make your own functions, you don't need toolboxes that are (probably not intentionall...

environ 5 ans il y a | 0

Réponse apportée
Choose Lyapunov function of a linear system
Hi Cristina, The first part of this is probably telling you what you already know, but denoting C = c*[1 -1 0; 0 1 -1; -1 0 1]...

plus de 5 ans il y a | 0

Réponse apportée
orthagonal planes and normal vectors
Hi M, A plane satisfies the dot product equation equation r dot v = const where r is the position vector [x y z] and v = [vx ...

plus de 5 ans il y a | 3

| A accepté

Réponse apportée
How to generate a random complex unitary matrix whose columns each sum up to 1
MODIFIED to replace previous random function Hi Michael, here is one way. It's based on the idea that if the unitary matrix U...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Solving a 3 degree of freedom mass spring damper model
Hi Z^2, Now that you have the K, C and M matrices, you can create a matrix equation to find the natural resonant frequencies. G...

plus de 5 ans il y a | 0

Réponse apportée
Solve for the constants of a Quartic given the complex roots?
Hi Johnathan, r = [-5 -6 -9.6+25.7i -9.6-25.7i]; p = poly(r) r1 = roots(p) % check p = 1.0e+04 * 0.0001 0.0030 ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Coding a function for the Fourier Transform.
Hi Anthony, the only problem here is the normalization. For the inverse transform you are dividing by sqrt(N) every time, (N b...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Ignoring NaNs for polyfit
Hello TimaMarie, yes, polyfit doesn't like NaNs. One way out is, just before doing polyfit, toss out the elements of both vari...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Find first item with a certain condition and use it, instead of finding all items with that condition
Hi Thomas, [After reading comments from Bruno and Rik I realized I forgot to mention that in order to get your code to run I ch...

plus de 5 ans il y a | 1

Réponse apportée
Fzero returning wrong root
Hello Emily If you insert this F_theta = double(F_theta); just after the calculation of F_theta, you will get the correct res...

plus de 5 ans il y a | 2

| A accepté

Réponse apportée
Solution of differential equations with an input derivative
Hi Pawel, you have e = -x(1) + 1; so de/dt = d/dt(-x(1) + 1) = -dx(1)/dt but dx(1)/dt = (x(2)-x(1))/T2 so you can replace...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
quat2angle different result
Hi Sven, it's pretty clear that both test and original have discontinuities because the function producing the angles, probably...

plus de 5 ans il y a | 0

Réponse apportée
WHY ARE THE COLORS OF MY LEGEND ALL MESSED UP?
Hi OI, One reason that Sylvain posted his comment is that you do not provide working code. And of course your odds of getting ...

plus de 5 ans il y a | 1

Réponse apportée
Why do I get too high dominant frequencies in FFT
Hi Timo, From your attached data I can see that it's 2 sec at 48 kHz as you said. In your frequency plot, the data seems to be...

plus de 5 ans il y a | 0

Réponse apportée
fitting only continous line
Hi salman, I have been off taking a look at this problem. The method below uses the fact that what you call the discontinouus ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
ilaplace returns unexpected answer
Hi Abdulla, You mention +- 3 as the coefficient, but are using +-6 in the actual example so I will stay with that. Looking at ...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
Changing the amplitude (y-axis) of an FFT back to units of force.
Hi Kev, The first thing is, the time and frequency arrays have to be correct. You are not actually using the 'time' variable b...

plus de 5 ans il y a | 1

Réponse apportée
How to avoid an Infinite Loop?
Waseem, Nothing in the entire while loop alters either 'sizes' or 'sizesB'. So if sizes(1) ~= sizesB(1), that condition will ...

plus de 5 ans il y a | 0

Réponse apportée
Calculation of antenna efficiency
Hi Shahar, The plot is of directivity, not gain (confusingly, directivity is sometimes called directive gain). Since directivi...

plus de 5 ans il y a | 0

| A accepté

Réponse apportée
How can I obtain the mean and standard deviation of a gaussian PDF
Hi Matthew, here is an example, where mu and sigma are calculated by numerical integration. Also shown are analytical results ...

plus de 5 ans il y a | 1

| A accepté

Réponse apportée
Why am I getting Complex number results?
Hello Ethan, The reason for this is that at step i = 14, the quantity on the third to last line, (1-(c*y(i)/T)) becomes negativ...

plus de 5 ans il y a | 1

Réponse apportée
Poisson Boltzmann eq. with an infinite boundary condition
Hi Roi For convenience I will use u in place of psi. An exact solution is tanh(u/4) = A*exp(-x) where A = tanh(1/4) ...

plus de 5 ans il y a | 1

Réponse apportée
Can I use the PDEPE solver to solve the following dimensionless Transient PFR PDE? If not, what method do you reconmend?
Hello Rogelio, For psi(t,eta) I assume that the boundary conditions are psi(0,eta) = 0 for all eta an...

plus de 5 ans il y a | 0

Réponse apportée
double peaks in FFT matlab
Hello hamzah the fft is a complex function. Are you plotting only the real part? This problem is occurring because your delta...

plus de 5 ans il y a | 0

Réponse apportée
How to plot wavelength and wavenumber FFT from intensity data
Hi Arwi, n = 3648, dpix = 8e-9; % 8nm seems small for a pixel width The x array has spacing delx = dpix and is x = delx*(0:...

plus de 5 ans il y a | 0

Réponse apportée
Verifying the uncertainty principle with fft for Gaussian
Hello Ori, The problem stems from the following, where I am using t and f rather than x and k (see comment). For an fft, once ...

plus de 5 ans il y a | 0

| A accepté

Charger plus