Réponse apportée
How to solve a set of coupled odes that depend on derivatives
HI charlie, dx4' depends on dx2' and dx3' explicitly. But since dOmega_e_dz and dV_e_dz are also in the expression for dx4', d...

plus de 6 ans il y a | 0

Réponse apportée
Issue with gammainc(x,a) for small x and larger a
Hi John, Matlab does not appear to have a symbolics version of the incomplete gamma function, but it's still possible to make p...

plus de 6 ans il y a | 0

Réponse apportée
im using 'dsolve' for 2nd ode with dirac function but matlab returns 1/2 of constant
Hi Song-Ha Your statement " the answer should be [constant] *exp(-0.4607 * t) * sin(3.0003*t) " is missing a very important f...

plus de 6 ans il y a | 0

Réponse apportée
Hypergeometric Function in Matlab
Hello PM, The variable l does not come out so well in this font so I'll call it q instead. SInce both -q and -n are negative, ...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
ODE45 Code Application
Hi James, [t,U] = ode45(@Velocity, [0, 20], .001); plot(t,U) function Udot = Velocity(t,U) M = 100/6*pi*0.04^3; g=9.8; A...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to simplify a symbolic equation, but still keep the denominator
Hi LZ syms x y a b eqn1 = b*(x/a + 1) == b*y/a; % This is the equation, I would like to cancel "b" at both side, and still kee...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Eliminating and counting rows that contain a pattern that already appeared
Hello Spencer, I assume that the patterns you mean have a length of 5. The way that you have set the the problem, 44313 (B row...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Fast Fourier Transform component detection issue
Hello awezmm, This occurs because of a combination of aliasing and the spacing of the chosen frequencies. For sampling frequen...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
My code won't run, related to ode function
Hi Dardenella, try the same thing only with [t,Y] = ode45(@(t,Y) f(t,Y,omega0,p), [0,10],[y0,v0]); % solve for 0<t<10 [n...

plus de 6 ans il y a | 1

Réponse apportée
How to make specific elements in a 3D matrix zero?
Hi Rabia, try for yy=1:10 temp = Costyearlydata(:,:,yy); temp(D(:,1,yy)) = 0; cost1(:,:,yy) = temp; end

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
constructing a difficult large matrix
Hi ektor, I presume you are interested not so much in the in the matrix A as in the 1000 scalars you get after you multiply eac...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Plot the travel for an electron by using ode45 (involving matrices)
Hi Ibrahim, There is nothing wrong with using matrices in this situation, and the plot is fine, insofar as it is plotting what ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Solver Equation not giving solution
Hi Diogo, Matlab syms can solve this, but it needs some help, which is squaring both sides of eqn3 to form a new eqn3. Also si...

plus de 6 ans il y a | 0

Réponse apportée
Mutual Inductance ODEs and wireless power transfer
Hello Tucker, You have two first order DE's so there is no need to have a vector x with four components. Four is appropriate f...

plus de 6 ans il y a | 1

Réponse apportée
Can anyone help me to fix my code?
Hello JCam, Since you are looking for a numerical result there is really no reason to use syms here. With x and y both being 1...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Strange disagreement between analytical phase and unwrap(angle())
Hello Joshua, There a a couple of issues with the analytic calculation. Xkabs = abs( Ampl*sin((pi*L/N)*(k-1)*dn)./sin((pi/N...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Plotting complex roots of polynomial
Hi Thomas, what the roots function is looking for is the coefficients of the powers of z in decreasing order. In this case tha...

plus de 6 ans il y a | 0

Réponse apportée
Problem with cholesky decomposition
Hi Peter, when you use the 'lower' option, chol assumes that the upper triangle is the complex conjugate transpose of the lower...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Refractive index profile calculation
Hi Tay, The following code addresses (1) in the text. For Lf = 1, D = 1 and 1000 layers the resulting plot reproduces the one ...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
Swapping the columns of a matrix with every other column
Hi Robert, Going with permutaions of the first six columns in conjuction with permutations of the last four columns certainly r...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to find all the non unique solutions in rank deficient system of linear equations in matlab
Hello Zeab, One solution is v0 = A\b. Since A is rank defiicient it has a nonempty null space nullA = null(A) which is dime...

plus de 6 ans il y a | 1

Réponse apportée
How to solve coupled ODE problem
Hi seoyeon, It's easy enough to solve for Ydot4 in the fourth equation. Then if you put that up front in the code, you can plu...

plus de 6 ans il y a | 0

Réponse apportée
How to extract the coefficient of x inside the exponential?
Hi Ishan, Squaring y gives 16 terms involving the product of two exponential functions. Multilying exponentials means adding t...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
How to copy colormap from an existing image
HI Alexei I copied the image you provided as a jpeg, used datatips to find coordinate points at the top and bottom of the color...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Taking an average of every n elements of one column
Hi Tony, a = rand(144,73,551); b = squeeze(a(:,3,:)); % take all the third columns c = mean(reshape(b,12,[])...

plus de 6 ans il y a | 0

Réponse apportée
Integration of a vector with hyperbolic function
Hi Sunit, Thanks for annotating the code and providing the expressions as comments. The key here is with the C1 coefficient...

plus de 6 ans il y a | 2

| A accepté

Réponse apportée
After the FFT(Frequency-Amplitude) of the seismic wave(Time-Acceleration), I want to reconstruct the seismic wave(Time-Acceleration) by IFFT again.
Hello haeyeon, A couple of things here. First of all, you are using nextpow2 to go from what looks like 10001 points to 16384....

plus de 6 ans il y a | 0

Réponse apportée
How do you do a radial Fourier transform in MATLAB?
Hi S, here is one way. First of all, the transform pair is q*F(q) = Int r*F(r) sin(q*r) dr r*F(r) = (1/(2*pi))*In...

plus de 6 ans il y a | 1

| A accepté

Réponse apportée
FFT and PSD - normalize values
Hi John, This concerns fft only; psd is a different animal. For a continuous oscillation, most people do not seem to be concer...

plus de 6 ans il y a | 0

| A accepté

Réponse apportée
Problem with using symbolic integration
Hello Yasho, For any reasonable q, integrating from l to u gives F = 1 by definition of the beta function. When q is an intege...

plus de 6 ans il y a | 1

| A accepté

Charger plus