Answered
Why the results are different using 'hypergeom' function and 'pochhammer' function to calculate the Gauss hypergeometric function
Hi huanyu, The answer is pretty simple: lack of precision. I modified F in the code below to output the vector that you sum...

7 years ago | 0

| accepted

Answered
finding interception of 3 spheres to calculate the coordinates of the 2 points
MODIFIED Hi Pietro, I don't know whether the issue is with coming up with the correct positions for the centers of the spher...

7 years ago | 0

| accepted

Answered
How can I solve and plot my equation of motion with ODE solver? (Keep getting errors)
Hi Eric, There are two things that keep this from running. First, you initialize dx as a column vector, but the statement ...

7 years ago | 0

| accepted

Answered
How to get linear fit standard deviation?
Hi Adam, Time to rescale. S = 1e18; % scale factor to bring x into the same ballpark as the second column of A ...

7 years ago | 0

| accepted

Answered
How I can speed up My code that contain of 8 FOR nested loops ?
Hi A, I am assuming that M,T and N are 7d arrays of the same size, n x n x n x n x n x n x n for some n. For n = 30 that's 3...

7 years ago | 0

| accepted

Answered
how I can get fundamental signal in 50 Hz using FFT (fast Fourier transformer)
Hi Ahmed, On your time domain plot, assuming points are on the horizontal and 50Hz, there are 20 pts/cycle which is consisten...

7 years ago | 0

| accepted

Answered
PSD calculation using FFT -
Hi Sergio, For a time domain signal x(t) and an N-point fft, y = fft(x)/N gives the correct scaling in the frequency domain a...

7 years ago | 0

Answered
Why does "polyeig" returns eigenvectors that have smaller size than number of eigenvalues?
Hi Masoud, Your matrix A is 402x402. Denote Gamma by G and Omega by W, both 201x201. Let each eigenvector of A be the conca...

7 years ago | 2

| accepted

Answered
traffic= poissrnd(lambda), lambda value is small
Hello Hassan, Since lambda is the mean value of the distribution, for small lambda there will not be a lot of traffic. If lam...

7 years ago | 0

Answered
Getting complex values for fitting parameters using nlinfit. Can anyone explain the reason why?
Hi Anik, In the Ag case, the initial values are b0_ag=[5 1.5 1.5] Take the first value of Stress_silver, Stress_silver = ...

7 years ago | 0

| accepted

Answered
How to properly solve a system of four first order ODEs
Hi 2L2, I don't think you are doing yourself any favors with the notation %y1 and y2 become x(1) and x(2) %x1 and x2 be...

7 years ago | 0

| accepted

Answered
How to find the value of spherical harmonic Ylm?
Hi Pragya, Although Mathworks is uncaringly blasé about special functions, they do have the associated Legendre function. So...

7 years ago | 0

Answered
relation between principal eigenvector and principal generalized eigenvector
Hi vr, When all the eigenvalues are distinct, the sets of eigenvectors v and v2 indeed indeed differ only by some scaling fac...

7 years ago | 0

| accepted

Answered
I am trying to solve these coupled equations using ode45...I have attached both the function file and script file...
Hi ruban, this addresses the immediate question (only). In the function, just before you start defining yp(1) = ..., etc, if...

7 years ago | 0

Answered
product of 2 normpdf is different to a bivariate mvnpdf with diagonal covariance matrix
Hi A, cov is specified by the covariance matrix, which in the diagonal case is simply independent variances. normpdf is spec...

7 years ago | 0

| accepted

Answered
Solving a complex differential equation for non-uniform circular motion
Hello Bhagyashree, although polar coordinates of course are not the most natural set of coordinates for this problem, the...

7 years ago | 0

Answered
Why I get a complex number of this integral?
Hi Jing s = 300 n = 2.12 f=@(x)( ( (0.75*s*sqrt(pi*x)-3.59) ./ sqrt(1-(0.75*s*(sqrt(pi*x))./114)) ).^(-n) ); x...

7 years ago | 0

| accepted

Answered
Measure angles between two vectors solely counter - clockwise
Hi Harvey, It looks like you want the angle in degrees. For two dimensions, where the second vector has components x,y: ...

7 years ago | 1

| accepted

Answered
PCA function outputting scores different to that expected, am i missing something?
Hi Matteo, I don't believe there is really a problem here. Let Vt denote the transpose of the data matrix Values, so that Vt...

7 years ago | 1

| accepted

Answered
Optimization with a differential term
Hi Joseph, ( for constant V situation see [2] ) [1] ------------------ This is not an ordinary Euler-Lagrange situation...

7 years ago | 0

Answered
Least Squares Of Linear Equations
Hi HH, There are a a couple of things going on here. I compacted your code a bit to make the code below, using .' in plac...

7 years ago | 1

Answered
issue with calculation of derivative using FFT
Hi Yilmaz, The problem is that your sine wave is not really periodic. With linspace, the first point is sigma = -pi and the ...

7 years ago | 0

| accepted

Answered
How to plot the phase response of dft using fft in matlab
Hi SSG, The angles look like noise because they _are_ noise. The fft of the sine wave consists of peaks at +-50 Hz and is es...

7 years ago | 0

Answered
Matrix inversion and summation
Hi Bee, Are you plotting the right variable? I ran your code, and zcon, zdirect and ziter all reproduce the same curve. Onl...

8 years ago | 0

| accepted

Answered
What to do for the right FFT in Matlab (two peaks and incorrect amplitude)?
Hi mldmnn, Since A*sin(2*pi*f0*t) = (A/(2i)) * ( exp(2*pi*i*f0*t) - exp(-2*pi*i*f0*t) ), the transform of sin has tw...

8 years ago | 1

Answered
Saying twopointcorr is undefined
Hi Amav You just have to make sure that twopointcorr is in a folder somewhere on the Matlab path, so that Matlab knows it exi...

8 years ago | 1

Answered
Results of PCA function
Hi Tiago, It's good to verify things as you are doing, and I don't believe that there is any problem. The eigenvalues agree....

8 years ago | 0

Answered
Hourly mean for my dataset on electric power consumed
Hello Giulia, This code works. One possible answer: you already have a variable in the workspace named 'mean'. That preemp...

8 years ago | 0

Answered
SNR=0 in FFT Plot
perhaps the snr is in dB, in which case signal level = noise level.

8 years ago | 0

Answered
Incorrect xcorr results from matlab r2017a signal processing toolbox?
Hi Peter, The difference is that corrcoef does its calculations about the mean and xcorr does not. If you add the line ...

8 years ago | 0

| accepted

Load more