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...

6 days ago | 0

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 ...

8 days 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 ...

12 days 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) = []

13 days 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...

18 days 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...

27 days 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....

27 days 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...

1 month ago | 0

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...

1 month ago | 1

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...

1 month 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...

1 month 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);

1 month 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...

1 month 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...

1 month ago | 0

Answered

Using find between two points

Hi Darpan, try it with just one & sign. && is for scalar comparisons, and you have a vector on each side.

Using find between two points

Hi Darpan, try it with just one & sign. && is for scalar comparisons, and you have a vector on each side.

1 month ago | 1

| accepted

Answered

Help to approximate this integral...

Hi M^2, I am assuming that y(t) is strictly monotonic increasing or decreasing so that the inverse exists. It's good if the y ...

Help to approximate this integral...

Hi M^2, I am assuming that y(t) is strictly monotonic increasing or decreasing so that the inverse exists. It's good if the y ...

2 months ago | 0

Answered

Why pca on my matrix gives the first number in latent matrix greater than one?

Hi Penny, Is there a reason that you think that a matrix of all ones and zeros can't have a latent value greater than 1? Here ...

Why pca on my matrix gives the first number in latent matrix greater than one?

Hi Penny, Is there a reason that you think that a matrix of all ones and zeros can't have a latent value greater than 1? Here ...

2 months ago | 1

| accepted

Answered

Finding miminum and maximum of function f(x)

Hi Faris, In 1d I assume you had y = f(x) with an x vector of length n, so its index is 1:n. Then [ymax ind] = max(y) xmax =...

Finding miminum and maximum of function f(x)

Hi Faris, In 1d I assume you had y = f(x) with an x vector of length n, so its index is 1:n. Then [ymax ind] = max(y) xmax =...

2 months ago | 1

Answered

Polynomial in S domain shows zero values

Hi Dushan, this is merely a display issue because L*C and R*C are so small compared to 1. Try the same thing with format shor...

Polynomial in S domain shows zero values

Hi Dushan, this is merely a display issue because L*C and R*C are so small compared to 1. Try the same thing with format shor...

2 months ago | 0

Answered

Unable to find explicit solution to differential eq

Hi Ditlev, I believe this does have an analytic solution that is not overly complicated, of the form x = (a+be^(-ct)) / (f+ge^...

Unable to find explicit solution to differential eq

Hi Ditlev, I believe this does have an analytic solution that is not overly complicated, of the form x = (a+be^(-ct)) / (f+ge^...

2 months ago | 0

| accepted

Answered

fftn, fftshift and interp3

Hi David, I believe the reason for this is the following. Staying in 1d for simplicity and not worrying about constants, the f...

fftn, fftshift and interp3

Hi David, I believe the reason for this is the following. Staying in 1d for simplicity and not worrying about constants, the f...

2 months ago | 0

| accepted

Answered

Using matlab to evolute a simple vector , but not fit the inference

Hi Darcy, It appears that the rule you want is a(t+1,i-1) = a(t+1,i-1) + 1 which does give the result you are looking for. ...

Using matlab to evolute a simple vector , but not fit the inference

Hi Darcy, It appears that the rule you want is a(t+1,i-1) = a(t+1,i-1) + 1 which does give the result you are looking for. ...

2 months ago | 0

Answered

How to determine the rotation matrix for rotating one vector to align with another ?

Hi Tao Feng. One candidate is products of rotation matrices about x,y and z, basically Euler angles. Including traditional Eul...

How to determine the rotation matrix for rotating one vector to align with another ?

Hi Tao Feng. One candidate is products of rotation matrices about x,y and z, basically Euler angles. Including traditional Eul...

2 months ago | 0

Answered

Trapezoidal Estimator for the integral

Hi Furkan, case 1: you are calculating Area2 with the trapezoidal approximation, but comparing it to Area1_actual when computi...

Trapezoidal Estimator for the integral

Hi Furkan, case 1: you are calculating Area2 with the trapezoidal approximation, but comparing it to Area1_actual when computi...

2 months ago | 1

| accepted

Answered

How to determine time-domain amplitude from frequency domain

Hi pimovietc, I'm not sure what is going on with the use of fs in some of your expressions so I will use a different but simila...

How to determine time-domain amplitude from frequency domain

Hi pimovietc, I'm not sure what is going on with the use of fs in some of your expressions so I will use a different but simila...

2 months ago | 1

| accepted

Answered

conv not giving the expected results. Why?

Hello Tara, You want to approximate an integral by using a sum. In general, for equally spaced t values with spacing deltat, t...

conv not giving the expected results. Why?

Hello Tara, You want to approximate an integral by using a sum. In general, for equally spaced t values with spacing deltat, t...

2 months ago | 1

| accepted

Answered

How can I plot a linear regression line on a loglog scatter plot in MATLAB?

Hi Samaneh, I will abbreviate moment and average_slip as x and y here. Since log log space is evidently the most meaningful re...

How can I plot a linear regression line on a loglog scatter plot in MATLAB?

Hi Samaneh, I will abbreviate moment and average_slip as x and y here. Since log log space is evidently the most meaningful re...

2 months ago | 0

| accepted

Answered

Matlab taking a very long time to give output when my error limit is low

Hi Anthony, The reason for this is that one of the initial boundaries, say the lower one, never gets changed while the upper bo...

Matlab taking a very long time to give output when my error limit is low

Hi Anthony, The reason for this is that one of the initial boundaries, say the lower one, never gets changed while the upper bo...

2 months ago | 0

| accepted

Answered

Why do I get repeated values for a variable when its parameters change with every iteration?

Hi Michael, Vave(j,k) and Ptube(j,k) are assigned values that depend on row index j but not column index k, so each row conta...

Why do I get repeated values for a variable when its parameters change with every iteration?

Hi Michael, Vave(j,k) and Ptube(j,k) are assigned values that depend on row index j but not column index k, so each row conta...

2 months ago | 0

| accepted

Answered

FFT of Large CSV File - Fundamental doesn't match data or simple sine test case

Hi Calvin, this is yet another example of the destructive power of using nextpow2 with the fft in the wrong circumstances. I t...

FFT of Large CSV File - Fundamental doesn't match data or simple sine test case

Hi Calvin, this is yet another example of the destructive power of using nextpow2 with the fft in the wrong circumstances. I t...

2 months ago | 0

| accepted