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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 2

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 1

| accettato

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 1

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

| accettato

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

quasi 8 anni fa | 1

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

quasi 8 anni fa | 1

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

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

quasi 8 anni fa | 0

| accettato

Carica altro