Answered
Optimizing calculation of eigenvectors and eigenvalues
Hi Guiseppi, there is nothing guaranteed about the order of the eigenvalues that are produced by eig. And if you do the first ...

etwa 2 Monate ago | 2

| accepted

Answered
Creating Polar mesh in matlab
Hi Reza, % make a rectangular grid of r and theta, % then define x and y in the usual way rr = 0:1:20; thth = (0:.05:1)*2*p...

etwa 2 Monate ago | 0

| accepted

Answered
Why when calculating impulse response of a filter (system) I get a “tail” at the end
Hi Yurii, It looks like the 'lowpass' function is doing something unexpected, which causes this. In order to get the transfer ...

etwa 2 Monate ago | 0

Answered
Peculiar Result with Solve (Symbolic Math Toolbox) with Three Equations and Three Unknowns. Can Anyone Explain?
Hi Paul, certainly in the first case, [eps/5, 4eps/5,eps] is a solution for any nonzero eps, and if you let eps--> 0 and invo...

etwa 2 Monate ago | 0

Answered
Find the common eigenvectors and eigenvalues between 2 matrices
Hi petit, Eigenvectors calculated by Matlab are normalized, but neither (a) the the overall phase of each one or (b) the order ...

etwa 2 Monate ago | 0

| accepted

Answered
means squared error and dB
Hi MatG, As with a lot of things, the answer depends. In your example, which is the first case below, the variation in power i...

2 Monate ago | 0

| accepted

Answered
Given One Partition of a Matrix, What is the Best Way to Find a Second Partition that Ensures the Matrix is Nonsingular?
Hi Paul, First of all, if C is not close to full rank, there can be numerical problems with most any calculation involving C. ...

2 Monate ago | 0

| accepted

Answered
convolution of exponential with unit step ... using conv command
Hi Muhammed, since your reply is a copy of the the orignal code, nothing changes. Anyway, the reason for the effect is that wh...

2 Monate ago | 0

Answered
Please help me convert spectral integral equation to matlab code.
Hi Emma, Seeing the actual problem helped. It sounds like this is supposed to be a region-1-only problem with region 2 out of ...

2 Monate ago | 0

Answered
Logical Indexing via multiplication
Hi Inna, not done by multiplication, but: ind = find(A==1) rows_you_want = B(ind,:) the colon means to take every column in w...

2 Monate ago | 0

| accepted

Answered
how to check if a point is inside an rotated ellipsoid?
Hi Amin, Since it appears that you know the rotation matrix, you can rotate the point p in question in the opposite direction t...

3 Monate ago | 1

| accepted

Answered
Since the matrix is near to singular I have tried pinv to solve but getting too deviated answers. Can you please let me know if there is any other way to solve the equations
Hi VS, Usually in these cases, finding the determinant is not as useful as finding the condition number. Unless you can show t...

3 Monate ago | 0

| accepted

Answered
How to find the delta cycles (change in the number of cycles) in two sine signals with nearly identical frequencies?
Hi Jay, Using the hilbert transform on the signal gives the so-called analytic signal. The transform creates an imaginary part...

3 Monate ago | 0

Answered
Guess update for Bessel function
Hi JS, For j = 1, figure 1 shows the general behavior of the function. Since it's a plot of log(abs(fun)) there can be no zero...

3 Monate ago | 0

| accepted

Answered
What kind of sorting algorithm is this?
Hello Karen, I guess it could depend on what is meant by 'corresponds to', since this sort is O(n^2) as is the bubble sort. So...

3 Monate ago | 1

| accepted

Answered
sum two variables ignoring NaN
Hi alpedhuez, sum(Var1,Var2,2,'omitnan') Here the '2' indicates that you are summing rows rather than columns (the default is ...

3 Monate ago | 0

Answered
How to make a color scale like this?
Hi pf, I copied in the image in your posting (a jpeg) and called it image1. That results in a 3d array that is 180x882x3 uint8...

3 Monate ago | 0

Answered
FFT of coupled oscillator from time domain (picosecond) to frequency domain (wavenumber, cm-1)
HI Kunjanni, this occurs because the fft contains both positive and negative frequency (wavenumber) components. Zero frequency...

3 Monate ago | 0

| accepted

Answered
Exponential function produces error with integrate command
Hi Ben for large x, exp(x) overflows to infinity before the exp(-(x.^2)/2) factor has a chance to bring in down. Try completin...

3 Monate ago | 0

| accepted

Answered
Even distribution of coordinates subset
Hi Giovanni, here is one method, which assumes that B is supposed to span basically the entire domain of A. Suppose the set of...

3 Monate ago | 0

| accepted

Answered
Why does pcolor require you to transpose the matrix when you give it x and y vectors?
Hi Darcy. pcolor works in the same fashion as meshgrid, and creates a grid with nx = length(x) columns and ny = length(y) rows....

3 Monate ago | 0

Answered
Undefined function 'sinc' for input arguments of type 'double'.
Hi boutaina, Since it's easy in Matlab to make your own functions, you don't need toolboxes that are (probably not intentionall...

3 Monate ago | 0

Answered
Choose Lyapunov function of a linear system
Hi Cristina, The first part of this is probably telling you what you already know, but denoting C = c*[1 -1 0; 0 1 -1; -1 0 1]...

3 Monate ago | 0

Answered
orthagonal planes and normal vectors
Hi M, A plane satisfies the dot product equation equation r dot v = const where r is the position vector [x y z] and v = [vx ...

3 Monate ago | 2

| accepted

Answered
How to generate a random complex unitary matrix whose columns each sum up to 1
MODIFIED to replace previous random function Hi Michael, here is one way. It's based on the idea that if the unitary matrix U...

3 Monate ago | 1

| accepted

Answered
Solving a 3 degree of freedom mass spring damper model
Hi Z^2, Now that you have the K, C and M matrices, you can create a matrix equation to find the natural resonant frequencies. G...

3 Monate ago | 0

Answered
Solve for the constants of a Quartic given the complex roots?
Hi Johnathan, r = [-5 -6 -9.6+25.7i -9.6-25.7i]; p = poly(r) r1 = roots(p) % check p = 1.0e+04 * 0.0001 0.0030 ...

3 Monate ago | 0

| accepted

Answered
Coding a function for the Fourier Transform.
Hi Anthony, the only problem here is the normalization. For the inverse transform you are dividing by sqrt(N) every time, (N b...

3 Monate ago | 0

| accepted

Answered
Ignoring NaNs for polyfit
Hello TimaMarie, yes, polyfit doesn't like NaNs. One way out is, just before doing polyfit, toss out the elements of both vari...

3 Monate ago | 0

| accepted

Answered
Find first item with a certain condition and use it, instead of finding all items with that condition
Hi Thomas, [After reading comments from Bruno and Rik I realized I forgot to mention that in order to get your code to run I ch...

3 Monate ago | 1

Load more