Answered

Why did i get different answers for eigenvectors for different powers of a matrix?

Hi RMT, Since you have two identical eigenvalues, the eigenvectors corresponding to those eigenvalues are not unique*. They on...

Why did i get different answers for eigenvectors for different powers of a matrix?

Hi RMT, Since you have two identical eigenvalues, the eigenvectors corresponding to those eigenvalues are not unique*. They on...

environ 2 mois ago | 1

| accepted

Answered

Element-Wise Vector Division

HI Mark, new_vector = K./vector; ./ (dot divide) does element-by-element operations.

Element-Wise Vector Division

HI Mark, new_vector = K./vector; ./ (dot divide) does element-by-element operations.

environ 2 mois ago | 1

| accepted

Answered

Vectorizing the addition of a vector of values with associated indices to an existing vector, when the vector of indices has repeated values.

Hi Nathan, sparse matrices automatically do what you want. You have full matrices, and sparse operations are on the slow side ...

Vectorizing the addition of a vector of values with associated indices to an existing vector, when the vector of indices has repeated values.

Hi Nathan, sparse matrices automatically do what you want. You have full matrices, and sparse operations are on the slow side ...

environ 2 mois ago | 0

| accepted

Answered

Sub-sampling the minimum number of points to accurately reproduce a curve

Hi Michael, take a look at the interp1 function. There are several choices for the type of interpolation, and assuming a curve ...

Sub-sampling the minimum number of points to accurately reproduce a curve

Hi Michael, take a look at the interp1 function. There are several choices for the type of interpolation, and assuming a curve ...

environ 2 mois ago | 0

Answered

Cannot find ALL solutions to simultaneous equation

Hi CZ If exp(x^2+y^2+z^2) = 9 then x^2+y^2+z^2 = log(9) which is a lot less challenging for symbolic evaluation. clear all...

Cannot find ALL solutions to simultaneous equation

Hi CZ If exp(x^2+y^2+z^2) = 9 then x^2+y^2+z^2 = log(9) which is a lot less challenging for symbolic evaluation. clear all...

environ 2 mois ago | 0

| accepted

Answered

Troubles assigning colorbar values in a bivariate histogram plot

Hi Mar, I have been looking at this with some data I made up, but now that you posted it I was able to plug it in. I thought y...

Troubles assigning colorbar values in a bivariate histogram plot

Hi Mar, I have been looking at this with some data I made up, but now that you posted it I was able to plug it in. I thought y...

environ 2 mois ago | 0

Answered

What to use instead of simple function?

Hi Liliana, 1/(2*pi^(1/2)*(1/(4*a^2))^(1/2)) may not be pretty, but it does equal a/sqrt(pi) so it is mathematically correct....

What to use instead of simple function?

Hi Liliana, 1/(2*pi^(1/2)*(1/(4*a^2))^(1/2)) may not be pretty, but it does equal a/sqrt(pi) so it is mathematically correct....

environ 2 mois ago | 0

Answered

a Simple Matrix question

Hello LC Matrix_C = matrix_A; Matrix_C(matrix_A == Matrix_B) = 255;

a Simple Matrix question

Hello LC Matrix_C = matrix_A; Matrix_C(matrix_A == Matrix_B) = 255;

2 mois ago | 0

Answered

How can I get more than 49 digits of pi in a string?

Hi India, vpa(pi,100) for example (although you need the symbolic toolbox for vpa) And see Walter's comment below. The answer...

How can I get more than 49 digits of pi in a string?

Hi India, vpa(pi,100) for example (although you need the symbolic toolbox for vpa) And see Walter's comment below. The answer...

2 mois ago | 0

Answered

plot polygon function error

Hi msh, the reason is pretty simple. You are asking for an output from the function, but you have not provided any in its defi...

plot polygon function error

Hi msh, the reason is pretty simple. You are asking for an output from the function, but you have not provided any in its defi...

2 mois ago | 0

Answered

why the legend show wrong lines ?

Hi tomer, try replacing plot(t,43*(19.6e-3)/(100*15e-3),' black '); %% plot--> of boundery limit with plot(t,43*(19.6e-3)/(...

why the legend show wrong lines ?

Hi tomer, try replacing plot(t,43*(19.6e-3)/(100*15e-3),' black '); %% plot--> of boundery limit with plot(t,43*(19.6e-3)/(...

2 mois ago | 0

| accepted

Answered

Solving 3 Simultaneous Exponential Equations

HI Rory, just for completeness y1 = 159.2543; y2 = 117.2699; y3 = 63.8384; x1 = 291.15; x2 = 293.15; x3 = 299.15; A1 =...

Solving 3 Simultaneous Exponential Equations

HI Rory, just for completeness y1 = 159.2543; y2 = 117.2699; y3 = 63.8384; x1 = 291.15; x2 = 293.15; x3 = 299.15; A1 =...

2 mois ago | 1

Answered

solve on vector equation

Hi Michiel, The unit vector N has to lie in the plane defined by s1 and s2. The result for any s1,s2 is N = s2 - (n1/n2)*s1;...

solve on vector equation

Hi Michiel, The unit vector N has to lie in the plane defined by s1 and s2. The result for any s1,s2 is N = s2 - (n1/n2)*s1;...

2 mois ago | 0

Answered

how can I creat a matrix of all possible combinations of zero and ones across eight digits.

HI Yonatan, not a black box: function a = x10(ndigits) a = ['0';'1']; count = 1; while count < ndigits n = size(...

how can I creat a matrix of all possible combinations of zero and ones across eight digits.

HI Yonatan, not a black box: function a = x10(ndigits) a = ['0';'1']; count = 1; while count < ndigits n = size(...

2 mois ago | 0

Answered

IFFT of Convolution equivalence

Hi JOB/Ridwan Here is a small example where a and b are padded with zeros, so that regular convolution can be compared with con...

IFFT of Convolution equivalence

Hi JOB/Ridwan Here is a small example where a and b are padded with zeros, so that regular convolution can be compared with con...

2 mois ago | 1

Answered

Why 999^999-999^999 is NaN?

HI Fahmy, >> realmax ans = 1.7977e+308 That's the largest floating point number in Mallab, which uses IEEE754 64 bit double ...

Why 999^999-999^999 is NaN?

HI Fahmy, >> realmax ans = 1.7977e+308 That's the largest floating point number in Mallab, which uses IEEE754 64 bit double ...

2 mois ago | 0

Answered

How to obtain CDF from the below PDF function

Hello Manesf, This pdf seems related to the Weibull distribution. I made some abrreviations Etta_d = xid Etta_D = xiD ...

How to obtain CDF from the below PDF function

Hello Manesf, This pdf seems related to the Weibull distribution. I made some abrreviations Etta_d = xid Etta_D = xiD ...

2 mois ago | 1

| accepted

Answered

In the matlab page of Associated Legendre Polynomials, is the example for the spherical harmonics correct?

Hi chaitanya, Good catch. Really good catch. In addition to the signs of the lobes, I believe that Matlab's Y32 is functional...

In the matlab page of Associated Legendre Polynomials, is the example for the spherical harmonics correct?

Hi chaitanya, Good catch. Really good catch. In addition to the signs of the lobes, I believe that Matlab's Y32 is functional...

3 mois ago | 2

| accepted

Answered

How to plot the velocity of a crate on a ramp for different angles?

Hi Kiera, The plot above shows the velocity of the box at the top of the ramp getting larger as the angle of the ramp gets stee...

How to plot the velocity of a crate on a ramp for different angles?

Hi Kiera, The plot above shows the velocity of the box at the top of the ramp getting larger as the angle of the ramp gets stee...

3 mois ago | 0

Answered

associated legendre functions matlab

Hi chaitanya, It's apples and oranges. When the domain of the argument is -1 <= x <= 1, the function is -sqrt(1-x^2). That's ...

associated legendre functions matlab

Hi chaitanya, It's apples and oranges. When the domain of the argument is -1 <= x <= 1, the function is -sqrt(1-x^2). That's ...

3 mois ago | 0

| accepted

Answered

Implementing a sum with summands of unequal spacing inside an integral

Hi Richard, I don't claim to be a professional although I did use Matlab at work, and here is how I would do this. The main th...

Implementing a sum with summands of unequal spacing inside an integral

Hi Richard, I don't claim to be a professional although I did use Matlab at work, and here is how I would do this. The main th...

3 mois ago | 1

| accepted

Answered

Does the permute function have a bug?

Hello ZY, see 'help permute'. Permute puts the dimensions in the order listed, so in this case the old 4th dimension goes firs...

Does the permute function have a bug?

Hello ZY, see 'help permute'. Permute puts the dimensions in the order listed, so in this case the old 4th dimension goes firs...

3 mois ago | 0

| accepted

Answered

Is it possible to create periodic boundary conditions for a matrix with linear indexing?

Hi Tom, mod(k,N)+1 for the raised index, k+1 mod(k-2,N)+1 for the lowered index, k-1 and these do give the correct vector of ...

Is it possible to create periodic boundary conditions for a matrix with linear indexing?

Hi Tom, mod(k,N)+1 for the raised index, k+1 mod(k-2,N)+1 for the lowered index, k-1 and these do give the correct vector of ...

3 mois ago | 0

| accepted

Answered

how to solve the equation: xdot=AX+Bu; where u=sin(2t)

Hi Ebraheem, ode45 is fine with explicit time dependence in the calculation of xdot: [t, x] = ode45(@smc5,[0, 10],[1, -2]) pl...

how to solve the equation: xdot=AX+Bu; where u=sin(2t)

Hi Ebraheem, ode45 is fine with explicit time dependence in the calculation of xdot: [t, x] = ode45(@smc5,[0, 10],[1, -2]) pl...

3 mois ago | 2

| accepted

Answered

Series expansion with Legendre polynomials

HI James, I won't address how one might print the result, but the mistake in the algrbra is that you should use y(i) = ((2*i+1...

Series expansion with Legendre polynomials

HI James, I won't address how one might print the result, but the mistake in the algrbra is that you should use y(i) = ((2*i+1...

3 mois ago | 0

Answered

Chua Oszillator in Matlab, Chaos

Hi Albin, In your second version, the equation for xdot is dimensionally incorrect. Changing it to xdot = (1/C1)*(G*(y-x-g));...

Chua Oszillator in Matlab, Chaos

Hi Albin, In your second version, the equation for xdot is dimensionally incorrect. Changing it to xdot = (1/C1)*(G*(y-x-g));...

3 mois ago | 0

Answered

Meshing a complex function with limits

Hello Haider, for someone who is new to Matlab you are doing well. You just need a couple of changes. First, you forgot that r...

Meshing a complex function with limits

Hello Haider, for someone who is new to Matlab you are doing well. You just need a couple of changes. First, you forgot that r...

3 mois ago | 1

| accepted

Answered

plot Gibbs phenomenon individually???

Hi Neptune, I agree that my comment on what the Gibbs phenomenon actually is was not very helpful to the actual problem at hand...

plot Gibbs phenomenon individually???

Hi Neptune, I agree that my comment on what the Gibbs phenomenon actually is was not very helpful to the actual problem at hand...

3 mois ago | 0

| accepted

Answered

Automatic Complex Conjugate in ftt

Hello Ha Oe the quote command is not just the transpose, it's the complex conjugate transpose (Hermetian conjugate). For the s...

Automatic Complex Conjugate in ftt

Hello Ha Oe the quote command is not just the transpose, it's the complex conjugate transpose (Hermetian conjugate). For the s...

3 mois ago | 1

| accepted

Answered

The input signal is complex conjugate, but the IFFT output is complex!

Hello yz, The problem is that to produce a real ifft, the first element of Ax, which is the f=0 term, has to be real since that...

The input signal is complex conjugate, but the IFFT output is complex!

Hello yz, The problem is that to produce a real ifft, the first element of Ax, which is the f=0 term, has to be real since that...

3 mois ago | 1

| accepted