Answered

Matrix division problem on adding condition

Hi David, let's take a simpler example: A = [1 2 3] B = eye(3) now A*D = A*B One solution is D = A\(A*B) [1] and we ...

Matrix division problem on adding condition

Hi David, let's take a simpler example: A = [1 2 3] B = eye(3) now A*D = A*B One solution is D = A\(A*B) [1] and we ...

environ 3 heures ago | 0

Answered

Evaluating svd() on slice of matrix array.

Hi Morten I take it that your matrices are close to being orthonomal already. Try [Q, ~] = qr(A(:,:,i)); A(:,:,i) = Q; whic...

Evaluating svd() on slice of matrix array.

Hi Morten I take it that your matrices are close to being orthonomal already. Try [Q, ~] = qr(A(:,:,i)); A(:,:,i) = Q; whic...

5 jours ago | 0

Answered

How to solve a system of linear equations with strict inequalities and equalities?

Hi Terri, Looks like it is not possible. You have [F1;F2;F3] = [10 2 10 15 20 8 6 4 12] * [x1;...

How to solve a system of linear equations with strict inequalities and equalities?

Hi Terri, Looks like it is not possible. You have [F1;F2;F3] = [10 2 10 15 20 8 6 4 12] * [x1;...

6 jours ago | 0

| accepted

Answered

How can I solve for the matrix S in the below mentioned matrix equation?

Hello NAA, It appears that you mean that d is 3x6,not 6x3. Let E = EPS_T - EPS_S and abbreviate inv(S) as iS. You are looki...

How can I solve for the matrix S in the below mentioned matrix equation?

Hello NAA, It appears that you mean that d is 3x6,not 6x3. Let E = EPS_T - EPS_S and abbreviate inv(S) as iS. You are looki...

6 jours ago | 1

| accepted

Answered

How do i scale to my axis after fft?

Hi Cherie, you have a time array of length, 601 and spacing deltat = .01. The frequency array is going to be 601 points with t...

How do i scale to my axis after fft?

Hi Cherie, you have a time array of length, 601 and spacing deltat = .01. The frequency array is going to be 601 points with t...

7 jours ago | 1

| accepted

Answered

Raise the elements of a matrix to a power.

Hi Ricardo, min3 = min.^3 It's not a good idea to name a variable 'min' because that is the name of a built-in Matlab function...

Raise the elements of a matrix to a power.

Hi Ricardo, min3 = min.^3 It's not a good idea to name a variable 'min' because that is the name of a built-in Matlab function...

7 jours ago | 1

| accepted

Answered

Solving an equation with terms that require double summation and products

Hi GS, I reproduced your results and then calculated the equation using for loops, just to make sure, and got 1.8767e37, same a...

Solving an equation with terms that require double summation and products

Hi GS, I reproduced your results and then calculated the equation using for loops, just to make sure, and got 1.8767e37, same a...

8 jours ago | 0

| accepted

Answered

Solving an equation with terms that require double summation and products

Hi GS, try aij_2 = aij.^2 Since y1 and y2 are scalars, there are three dots in the last equation that you can drop. I usuall...

Solving an equation with terms that require double summation and products

Hi GS, try aij_2 = aij.^2 Since y1 and y2 are scalars, there are three dots in the last equation that you can drop. I usuall...

9 jours ago | 0

Answered

How to plot double sided amplitude spectrum after FFT?

Hi Hamid, at the end of your code I added the following: figure(2) plot(f,fftshift(cmag),'o'); grid on xlim([-30 30]); f...

How to plot double sided amplitude spectrum after FFT?

Hi Hamid, at the end of your code I added the following: figure(2) plot(f,fftshift(cmag),'o'); grid on xlim([-30 30]); f...

10 jours ago | 0

| accepted

Answered

Why are the symbolic units not evaluated by a square root?

Hi Lucas, try your original code but with the last two lines omega_n = (pi/l)^2*(g*E*I/(A*lambda))^(1/2) omega_n = vpa(simpli...

Why are the symbolic units not evaluated by a square root?

Hi Lucas, try your original code but with the last two lines omega_n = (pi/l)^2*(g*E*I/(A*lambda))^(1/2) omega_n = vpa(simpli...

15 jours ago | 0

Answered

how to calculate direction in rotated coordinate system

Hi UWM, Assuming the correct rotation has already been made, then calling the resulting vector u, and making sure it is normali...

how to calculate direction in rotated coordinate system

Hi UWM, Assuming the correct rotation has already been made, then calling the resulting vector u, and making sure it is normali...

16 jours ago | 0

| accepted

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

16 jours 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.

19 jours 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 ...

19 jours 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 ...

19 jours 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...

20 jours 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...

20 jours 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....

30 jours 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;

environ un 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...

environ un 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...

environ un 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)/(...

environ un 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 =...

environ un 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;...

environ un 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(...

environ un 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...

environ un 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 ...

environ un 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 ...

environ un 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...

environ 2 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...

environ 2 mois ago | 0