Answered

About FFT of cosine function

Hi mk, In order to get just the two sharp peaks you need to have exactly n oscillations in the time domain. Otherwise the wave...

About FFT of cosine function

Hi mk, In order to get just the two sharp peaks you need to have exactly n oscillations in the time domain. Otherwise the wave...

21 hours ago | 0

Answered

impulse response for difference equation

Hi Roger, try bb(N+1) = -power(a,N); which is what you actually have. I think you'll lilke the resulting plot.

impulse response for difference equation

Hi Roger, try bb(N+1) = -power(a,N); which is what you actually have. I think you'll lilke the resulting plot.

8 days ago | 0

| accepted

Answered

How can I solve this set of complex equations?

Hi Stefanos, As has already been mentioned, the 4th equation is just the definition of V0' and is independent of the first thre...

How can I solve this set of complex equations?

Hi Stefanos, As has already been mentioned, the 4th equation is just the definition of V0' and is independent of the first thre...

8 days ago | 0

Answered

Changing a parameter in a differential equation?

Hi Sean, you can pass the value of epsilon into the ode function with [tSol,YSol]=ode45(@(t,Y) quantumsystem(t,Y,epsilon),tRan...

Changing a parameter in a differential equation?

Hi Sean, you can pass the value of epsilon into the ode function with [tSol,YSol]=ode45(@(t,Y) quantumsystem(t,Y,epsilon),tRan...

12 days ago | 0

| accepted

Answered

Regularized hypergeometric function 1F2 within matlab?

Hi Wozciech, if you add a prod function, part3 = prod(gamma([(1-n/2),(3/2 - n/2)])) then you're good to go. Or, you could us...

Regularized hypergeometric function 1F2 within matlab?

Hi Wozciech, if you add a prod function, part3 = prod(gamma([(1-n/2),(3/2 - n/2)])) then you're good to go. Or, you could us...

13 days ago | 1

| accepted

Answered

Matrix multiplied by inverse is not giving correct answer

Matlab is telling you the answer, that the matrix (call it M) is close to singular or badly scaled (singular in this case). M h...

Matrix multiplied by inverse is not giving correct answer

Matlab is telling you the answer, that the matrix (call it M) is close to singular or badly scaled (singular in this case). M h...

13 days ago | 1

Answered

Complex number and fft

Hi Nmak, you are just getting into standard numerical precision issues. The fft and ifft involove complex variable calculation...

Complex number and fft

Hi Nmak, you are just getting into standard numerical precision issues. The fft and ifft involove complex variable calculation...

14 days ago | 1

| accepted

Answered

Interpolating and resampling around closed curve to calculate centroid

Hi Sofia, Since your points are pretty closely spaced, there is not much need to interpolate the points. The method below pick...

Interpolating and resampling around closed curve to calculate centroid

Hi Sofia, Since your points are pretty closely spaced, there is not much need to interpolate the points. The method below pick...

14 days ago | 1

| accepted

Answered

Regularizied hypergeometric function gives an error for z being greater than 1.

Hi Wojciech, I am assuming that there is no problem when n is not an integer, only when n is a positive integer greater than 1....

Regularizied hypergeometric function gives an error for z being greater than 1.

Hi Wojciech, I am assuming that there is no problem when n is not an integer, only when n is a positive integer greater than 1....

17 days ago | 1

| accepted

Answered

Smooth derivative of a matrix

Hi Daniel As you know, multiplying each column of a unitary matrix by a scalar phase factor still results in a unitary matrix (...

Smooth derivative of a matrix

Hi Daniel As you know, multiplying each column of a unitary matrix by a scalar phase factor still results in a unitary matrix (...

21 days ago | 1

Answered

solve and plot nonlinear system of equations with no explicit solution

HI Cengizhan, MODIFIED The first equation above is (-1/2)*(cos(x)*cos(z)+sin(theta)/psi) = 0 (1) which has an extraneous ...

solve and plot nonlinear system of equations with no explicit solution

HI Cengizhan, MODIFIED The first equation above is (-1/2)*(cos(x)*cos(z)+sin(theta)/psi) = 0 (1) which has an extraneous ...

23 days ago | 0

Answered

Check whether the symbolic eigen value of a matrix is positive or negative

Hello TS with your definition of Am we have simplify(trace(Am)) ans = -(672*d*g + a*d^4 + 36*a*g^2 + 576*g^2 + 42*a*d*g + ...

Check whether the symbolic eigen value of a matrix is positive or negative

Hello TS with your definition of Am we have simplify(trace(Am)) ans = -(672*d*g + a*d^4 + 36*a*g^2 + 576*g^2 + 42*a*d*g + ...

24 days ago | 1

| accepted

Answered

Large integer rounding problem

Hello HS, you ran into the limits of double precision numbers. However, (1+x/n)^n = e^x*f % f = correction factor...

Large integer rounding problem

Hello HS, you ran into the limits of double precision numbers. However, (1+x/n)^n = e^x*f % f = correction factor...

25 days ago | 0

| accepted

Answered

Remove peak at 0 hz of fft

Hi Emmy It's all in how you view things. Literally. Here is what happens when using x - mean(x). fs = 1000; N = 30000; fig...

Remove peak at 0 hz of fft

Hi Emmy It's all in how you view things. Literally. Here is what happens when using x - mean(x). fs = 1000; N = 30000; fig...

1 month ago | 0

| accepted

Answered

Using 'solve' on a vector of line equations?

Hi Jonathan, It's not totally clear if the geometry is such that there is a separate t value for each row of the hits{1} and hi...

Using 'solve' on a vector of line equations?

Hi Jonathan, It's not totally clear if the geometry is such that there is a separate t value for each row of the hits{1} and hi...

1 month ago | 1

| accepted

Answered

Calculating the contributing terms of a summation equation

Hi Bharath, suppose the sum involving q is done over a dummy index j instead of i. It appears that Y and y are vectors of the ...

Calculating the contributing terms of a summation equation

Hi Bharath, suppose the sum involving q is done over a dummy index j instead of i. It appears that Y and y are vectors of the ...

1 month ago | 0

Answered

use the previous result of a function in the calculation

Hi Matthew, there is definitely a better way. Y = filter(B,[1 -A],X) Here the assumption is that X is an input vector and B i...

use the previous result of a function in the calculation

Hi Matthew, there is definitely a better way. Y = filter(B,[1 -A],X) Here the assumption is that X is an input vector and B i...

1 month ago | 0

Answered

Plotting Fourier series from fft output / how to obtain fundamental freq.

Hi Morgan, In this situation with periodic waves, the ftt is divided by L, as you have. The fft is at heart an operation using...

Plotting Fourier series from fft output / how to obtain fundamental freq.

Hi Morgan, In this situation with periodic waves, the ftt is divided by L, as you have. The fft is at heart an operation using...

1 month ago | 0

Answered

quintuple summation using a for loop

Hello Wyatt, The sum comes out zero because it is, in fact, zero. Each term in the desired sum is ((-1)^(iw+jw+k+l+p+q))*con...

quintuple summation using a for loop

Hello Wyatt, The sum comes out zero because it is, in fact, zero. Each term in the desired sum is ((-1)^(iw+jw+k+l+p+q))*con...

2 months ago | 0

Answered

PSD from Wiener Khintchine and FFT

Hi Jan-Niklas It's easier done with convolution instead of correlatation, so convolution is first here. fft does circular conv...

PSD from Wiener Khintchine and FFT

Hi Jan-Niklas It's easier done with convolution instead of correlatation, so convolution is first here. fft does circular conv...

2 months ago | 0

Answered

Why the coordinate doesn't make sense after rotation matrix (rotx)?

Hi Jiali, from your results it looks like you are using the usual form of the rotation matrices, function M = Rx(theta) % an...

Why the coordinate doesn't make sense after rotation matrix (rotx)?

Hi Jiali, from your results it looks like you are using the usual form of the rotation matrices, function M = Rx(theta) % an...

2 months ago | 0

| accepted

Answered

differential equation with mixed linear and log derivatives - proper setting

Hi Patrezio, d(log(x)) = dx/x, and you can insert that result in three locations to obtain eq1 = x*diff( log(y), x) + x*diff( ...

differential equation with mixed linear and log derivatives - proper setting

Hi Patrezio, d(log(x)) = dx/x, and you can insert that result in three locations to obtain eq1 = x*diff( log(y), x) + x*diff( ...

2 months ago | 1

Answered

Are there any built-in way to calculate inversions?

Hi Ivor, I do not know of one, but here is one way to accomplish it p = [3 6 1 4 5 2]; % for example inversions = 0; for...

Are there any built-in way to calculate inversions?

Hi Ivor, I do not know of one, but here is one way to accomplish it p = [3 6 1 4 5 2]; % for example inversions = 0; for...

2 months ago | 0

| accepted

Answered

convolution with gaussian kernel using fft

Hi LM The code below takes your approach but modifies some of the details. [1] The array sizes are odd x odd since you get th...

convolution with gaussian kernel using fft

Hi LM The code below takes your approach but modifies some of the details. [1] The array sizes are odd x odd since you get th...

2 months ago | 1

| accepted

Answered

I have 744 hourly wind data points for the month of january i.e 24 data points for each day (744 for 31 days) For each day I need to fit the 24 hourly data points with the non linear function C(1)+C(2).*sin(2*pi/24.*(x-C(3)))+C(4).*sin(2*pi/12.*(x-

Hi Gourav, this is not really a nonlinear problem. That's because dropping some parenthesis) C2*sin(2*pi/24*(x-C3)) = -C2*[ s...

I have 744 hourly wind data points for the month of january i.e 24 data points for each day (744 for 31 days) For each day I need to fit the 24 hourly data points with the non linear function C(1)+C(2).*sin(2*pi/24.*(x-C(3)))+C(4).*sin(2*pi/12.*(x-

Hi Gourav, this is not really a nonlinear problem. That's because dropping some parenthesis) C2*sin(2*pi/24*(x-C3)) = -C2*[ s...

2 months ago | 0

Answered

How could I find the maximum closed contour line?

Hello YC, Since a saddle point is where the contour lines go from closed to open, the idea is to find the location of the saddl...

How could I find the maximum closed contour line?

Hello YC, Since a saddle point is where the contour lines go from closed to open, the idea is to find the location of the saddl...

2 months ago | 0

Answered

Normalization of FFT output

Hello Vittorio, In the gaussian case, the waveform has died down to zero each end (technically it's not zero, but it is smaller...

Normalization of FFT output

Hello Vittorio, In the gaussian case, the waveform has died down to zero each end (technically it's not zero, but it is smaller...

2 months ago | 0

Answered

Error in a function

Hi Morne' Here Matlab assumed that the call to the function was part of the function itself. In a script, functions must be lo...

Error in a function

Hi Morne' Here Matlab assumed that the call to the function was part of the function itself. In a script, functions must be lo...

2 months ago | 0

Answered

FFT: scaling for correct amplitude

Hi Eric, It's not the specific details of the signal so much as it is the context. If you are transforming what is basically a...

FFT: scaling for correct amplitude

Hi Eric, It's not the specific details of the signal so much as it is the context. If you are transforming what is basically a...

2 months ago | 1

Answered

Different eigenvectors when using eig and null functions

Hi Mohammed, I tossed in some 'double' functions to make the comparison easier A = [3 2 ; 7 -1]; syms x; a2a = sym(A); pol...

Different eigenvectors when using eig and null functions

Hi Mohammed, I tossed in some 'double' functions to make the comparison easier A = [3 2 ; 7 -1]; syms x; a2a = sym(A); pol...

2 months ago | 1

| accepted