Answered

Cannot plot Fourier Transform

Hi Reza, If you take a look at X, the result is X = -((pi*w*sign(w))/2 + fourier(cos(4*t)/t^2, t, w)/2)/pi^2 which shows tha...

Cannot plot Fourier Transform

Hi Reza, If you take a look at X, the result is X = -((pi*w*sign(w))/2 + fourier(cos(4*t)/t^2, t, w)/2)/pi^2 which shows tha...

2 Monate ago | 0

Answered

IFFT integration doesn't match cumtrapz integration

Hi NIk, This is an Interesting problem. Let g be the function and G its integral. If you just want to key in on an improved r...

IFFT integration doesn't match cumtrapz integration

Hi NIk, This is an Interesting problem. Let g be the function and G its integral. If you just want to key in on an improved r...

2 Monate ago | 0

Answered

Obtain eigenvalue from matrix and known eigenvector

Hi Henry, you can find the indices where x = 0 and cast those entries out of both x and the corresponding rows and columns of A...

Obtain eigenvalue from matrix and known eigenvector

Hi Henry, you can find the indices where x = 0 and cast those entries out of both x and the corresponding rows and columns of A...

3 Monate ago | 0

Answered

fftshift with even and odd number of data points (scaling the positive and negative frequency axis)

Hi Farooq, [1] For N odd, the frequencies before and after using fftshift (or ifftshift) are as you say: N = 9 example: fo...

fftshift with even and odd number of data points (scaling the positive and negative frequency axis)

Hi Farooq, [1] For N odd, the frequencies before and after using fftshift (or ifftshift) are as you say: N = 9 example: fo...

3 Monate ago | 1

| accepted

Answered

Getting a smooth curve instead of two linear functions

Hi Arber, This can be done reasonably well by a hyperola whose asymptotes are the two lines in question. The hyperbola of cour...

Getting a smooth curve instead of two linear functions

Hi Arber, This can be done reasonably well by a hyperola whose asymptotes are the two lines in question. The hyperbola of cour...

3 Monate ago | 2

| accepted

Answered

eigs bug for 0 as lowest eigenvalue in parts of the matlab versions

Hi pl, 2018b does not list 'sa' as an option for eigs, so I am speculating that that 'sa' is legacy. However, compariing 'sa' t...

eigs bug for 0 as lowest eigenvalue in parts of the matlab versions

Hi pl, 2018b does not list 'sa' as an option for eigs, so I am speculating that that 'sa' is legacy. However, compariing 'sa' t...

3 Monate ago | 0

Answered

Reduce the computional time to calculate the mutilplying two matrixes

Hi Thu, try % N = 1000; % M = 200; Q00 = reshape(Q0,N,N*M); ff = reshape(w'*Q00,N,M)'; This is approximately four times f...

Reduce the computional time to calculate the mutilplying two matrixes

Hi Thu, try % N = 1000; % M = 200; Q00 = reshape(Q0,N,N*M); ff = reshape(w'*Q00,N,M)'; This is approximately four times f...

3 Monate ago | 1

Answered

sine fit in matlab vs closed-form expressions (linear least squares)

Hi Thales, Before doing the least squares calculation it makes sense to try the less ambitious result of finding the right ampl...

sine fit in matlab vs closed-form expressions (linear least squares)

Hi Thales, Before doing the least squares calculation it makes sense to try the less ambitious result of finding the right ampl...

3 Monate ago | 2

| accepted

Answered

Replace vector of idexes with values from another vector corresponding to those indexes

Hi Nate, c = b(a) gets it done. a becomes an index vector into the elements of b.

Replace vector of idexes with values from another vector corresponding to those indexes

Hi Nate, c = b(a) gets it done. a becomes an index vector into the elements of b.

3 Monate ago | 1

| accepted

Answered

Division problems wiht matrix, calculation error

Hi Eduardo, It's quite likely that two of the displayed values for LineInf and LineSup are not what you think they are. The va...

Division problems wiht matrix, calculation error

Hi Eduardo, It's quite likely that two of the displayed values for LineInf and LineSup are not what you think they are. The va...

3 Monate ago | 0

| accepted

Answered

Audio fft shape is too strange.

Hi eunbae, The code is pretty close. The fft of a real signal has positive and negative frequencies, and what you are seeing a...

Audio fft shape is too strange.

Hi eunbae, The code is pretty close. The fft of a real signal has positive and negative frequencies, and what you are seeing a...

3 Monate ago | 1

| accepted

Answered

Is It possible create a function that, given an equation, finds the value of the (x) so the two members are equal?

Hi Gianmarco, the two equations aren't coupled, and using fzero on Mp^2 seems to work. In the first equation I multiplied by b...

Is It possible create a function that, given an equation, finds the value of the (x) so the two members are equal?

Hi Gianmarco, the two equations aren't coupled, and using fzero on Mp^2 seems to work. In the first equation I multiplied by b...

4 Monate ago | 0

Answered

Defining derivatives in ode45

Hello sina, If you turn the diagram around by 180 degrees and then let Ca <--> Cb, you get exactly the same diagram that you st...

Defining derivatives in ode45

Hello sina, If you turn the diagram around by 180 degrees and then let Ca <--> Cb, you get exactly the same diagram that you st...

4 Monate ago | 1

| accepted

Answered

3d Hemisphere transformation Problem from A to 90 degrees in Z axis to B direction

Hi Musa, In the figure you don't say which axis is which, but I will assume +x axis out of the page toward the viewer, +y axis ...

3d Hemisphere transformation Problem from A to 90 degrees in Z axis to B direction

Hi Musa, In the figure you don't say which axis is which, but I will assume +x axis out of the page toward the viewer, +y axis ...

4 Monate ago | 1

| accepted

Answered

Binomial simulation decreasing error

Hello LD Using M in place of your i, the binornd(M,p*ones(1,N)) creates N draws from a particular binomial distribution. Thi...

Binomial simulation decreasing error

Hello LD Using M in place of your i, the binornd(M,p*ones(1,N)) creates N draws from a particular binomial distribution. Thi...

4 Monate ago | 1

Answered

power of blackbody radiation

HI rabindra, The expression has a problem at the first point, lambda = 0. But I1 is so tiny near the origin that you can safel...

power of blackbody radiation

HI rabindra, The expression has a problem at the first point, lambda = 0. But I1 is so tiny near the origin that you can safel...

4 Monate ago | 0

Answered

Phase shift - different results with pi/2 and 1.570796326

Hi Buli, Although I don't have simulink, I think it is reasonably clear what is going on. I will assume here that -pi/2 is the...

Phase shift - different results with pi/2 and 1.570796326

Hi Buli, Although I don't have simulink, I think it is reasonably clear what is going on. I will assume here that -pi/2 is the...

4 Monate ago | 2

| accepted

Answered

to find the root of quantum transcendental equation

Hi pl, The boundary condition K*cot((KR) = -k (denoted by bc1 below) is for a wave function that is proportional to sin(KR) in ...

to find the root of quantum transcendental equation

Hi pl, The boundary condition K*cot((KR) = -k (denoted by bc1 below) is for a wave function that is proportional to sin(KR) in ...

4 Monate ago | 0

| accepted

Answered

Solving inequalities without Symbolic Math Toolbox

Hi Andrik, I'm not sure why you are calling these equations 'inequalities', but if you are looking for a numerical solution to ...

Solving inequalities without Symbolic Math Toolbox

Hi Andrik, I'm not sure why you are calling these equations 'inequalities', but if you are looking for a numerical solution to ...

5 Monate ago | 0

| accepted

Answered

Circularly exclude elements.

Hi Abhijit, try x = 1:n; x(mod([k-1 k+1]-1,n)+1) = []

Circularly exclude elements.

Hi Abhijit, try x = 1:n; x(mod([k-1 k+1]-1,n)+1) = []

5 Monate ago | 1

| accepted

Answered

1st element of the 'Amplitude' of a fft function

Hi NIma, As you point out, signal_FFT(1) is the sum of all the X values (or the mean if you divide by the number of points in X...

1st element of the 'Amplitude' of a fft function

Hi NIma, As you point out, signal_FFT(1) is the sum of all the X values (or the mean if you divide by the number of points in X...

5 Monate ago | 1

| accepted

Answered

Select which legend entries to use depending on data set plotted

Hi Henry, A simple way to do this is, when a trace does not exist, substitute it with nan(1,n) or nan(n,1), keeping the array t...

Select which legend entries to use depending on data set plotted

Hi Henry, A simple way to do this is, when a trace does not exist, substitute it with nan(1,n) or nan(n,1), keeping the array t...

5 Monate ago | 0

Answered

How to plot a numerical integral using the trapezoidal method

Hi Mahdi, I believe your units are correct, although dividing by D gives normalized conductivity and not absolute conductivity....

How to plot a numerical integral using the trapezoidal method

Hi Mahdi, I believe your units are correct, although dividing by D gives normalized conductivity and not absolute conductivity....

5 Monate ago | 0

Answered

FFT and IFFT: Random Phases

Hi Nycholas, Assuming signal is real and of length n, n even, then Y(1) is for frequency 0, the DC contribution, and it's real...

FFT and IFFT: Random Phases

Hi Nycholas, Assuming signal is real and of length n, n even, then Y(1) is for frequency 0, the DC contribution, and it's real...

5 Monate ago | 1

Answered

Difference between x*(1e-n1) == x/(1en2)??

Hi Rob, The difference comes down to rounding of the very last digit in binary representation. It's interesting to use 'format...

Difference between x*(1e-n1) == x/(1en2)??

Hi Rob, The difference comes down to rounding of the very last digit in binary representation. It's interesting to use 'format...

5 Monate ago | 1

| accepted

Answered

In the "ex_simrf_adc", there is a 50 Ohm connection with the voltage of 0.1 micro Volt input and it is converted to -142 dBm input and I am not able to get the exact power calculation. Could you please show me?

Hi Charles, I don't have simulink, but to convert from Vrms to dBm, dBm = 10*log10(Vrms.^2/50) + 30; Here Vrms.^2/50 is the p...

In the "ex_simrf_adc", there is a 50 Ohm connection with the voltage of 0.1 micro Volt input and it is converted to -142 dBm input and I am not able to get the exact power calculation. Could you please show me?

Hi Charles, I don't have simulink, but to convert from Vrms to dBm, dBm = 10*log10(Vrms.^2/50) + 30; Here Vrms.^2/50 is the p...

5 Monate ago | 0

Answered

problem of pdepe!

Hi Junyi, When you made the change, the flux went down by a factor of 1/pi^2. That's fine, but one of your boundary conditions...

problem of pdepe!

Hi Junyi, When you made the change, the flux went down by a factor of 1/pi^2. That's fine, but one of your boundary conditions...

6 Monate ago | 0

Answered

how do i plot sin(2pi*3t) * sin(2pi*15t)

Hi Jesus, what they are saying is % .* for element-by-element multiplication y=sin(2*pi*3*t).*sin(2*pi*15*t);

how do i plot sin(2pi*3t) * sin(2pi*15t)

Hi Jesus, what they are saying is % .* for element-by-element multiplication y=sin(2*pi*3*t).*sin(2*pi*15*t);

6 Monate ago | 0

Answered

My matlab plot is blank when I plot

Hi Henry, In the definition of H1, use ./ instead of / so you get term-by-term division. To spot the error, one straighforwa...

My matlab plot is blank when I plot

Hi Henry, In the definition of H1, use ./ instead of / so you get term-by-term division. To spot the error, one straighforwa...

6 Monate ago | 1

| accepted

Answered

Determine the maxima and minima of the function

Hi Maria, for a fumction f(x), fminbnd determines the value of x where the minimum occurs. You would have found p09xmax if you...

Determine the maxima and minima of the function

Hi Maria, for a fumction f(x), fminbnd determines the value of x where the minimum occurs. You would have found p09xmax if you...

6 Monate ago | 0