Beantwortet
how to rotate coordiante system about Z axis first then rotate about about the new Y axis.
Hi Yang, Suppose you have rotation matrices Rx = [1 0 0 Ry = [c 0 -s Rz = [c -s 0 0 c -s 0 ...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
Radioactive Decay from Atom 1 to Atom 2 to Atom 3
Hi says, This is pretty close. In your expression for N_2, there is a misplaced right parenthesis. The factor in front is s...

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 2

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 0

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

fast 8 Jahre vor | 0

| akzeptiert

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

fast 8 Jahre vor | 1

| akzeptiert

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

fast 8 Jahre vor | 1

| akzeptiert

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 1

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 0

| akzeptiert

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

etwa 8 Jahre vor | 1

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

etwa 8 Jahre vor | 1

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

etwa 8 Jahre vor | 0

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

etwa 8 Jahre vor | 0

Mehr laden