Réponse apportée
error in computing atanh
Hello Francisco, The imaginary part is i*pi/2, so the two answers are a+i*pi/2 and a-i*pi/2, where a is real. Both answers are...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
Significance of Nyquist frequency and Maximum frequency THD computation for FFT analysis
Hi Alsher, you don't show the horizontal frequency scale but I believe that the very small peaks have spacing 5 Hz, there are 1...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How to calculate error of trapz() function?
Hi Emil, Although there are uncertainties, you can draw some conclusions by using reasonable assumptions. First, you have to b...

environ 5 ans il y a | 0

Réponse apportée
How do I prevent overwriting of matrix elements?
Hi Domantas This is just a provisional answer since I am not sure exactly what you are trying to do, but statements like H(1:...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How do I use acot(x) as a continuous function in matlab?
Hi Michael, I believe that 1/2 - (1/pi)*atan(x) fills the bill. It's the same as (1/pi)*acot(x) for x>0 and is continuous, w...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
3D Plot of 2D sim
Hi Lujain, After setting v = [0 1 1] to provide some initial z velocity, figure(2) plot3(X(:,1),X(:,2),X(:,3)) grid on and ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
How to Find the Rotation Matrix?
Hi ercan, MODIFIED First of all, for a rotation matrix the two known columns have to be an orthonormal pair, meaning that ther...

environ 5 ans il y a | 2

| A accepté

Réponse apportée
Waveform not staring at origin
Hi SA, If you temporarily set c0 = 0 you obtain a nice trapezoidal wave of amplitude 1 that oscillates about y = 0 and has a me...

environ 5 ans il y a | 0

Réponse apportée
How do I find a D matrix that satisfies [K]*inv(M)*[D]==[D]*inv(M)*[K] ?
Hi Ikram, Using N in place of inv(M) for simplicity, you are looking for a D such that K*N*D = D*N*K Let K*N and N*K have eig...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Is there anyway to calculate the position in coordinates of points using a n*n distance matrix?
Hi Meme, first of all, if all you have are the distances between points, you can translate the all the points together in the 2...

environ 5 ans il y a | 0

Réponse apportée
Summation subroutine giving result as NaN (not a number)!
Hi Louis, the basic problem is that in the product calculation you have for l=0:n if (l~=j) && (l~=i) && (l~=m) prod=p...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
Replace diagonals in a matrix
Hi Hasan, here is one way r = rand(7,7) n = size(r,1); m = (n-1)/2; a = (-m:m)-(-m:m)'; r(abs(a)>1)=0 assuming the main...

environ 5 ans il y a | 0

Réponse apportée
unitConvert isn't converting to Hz
Hi Henrique. you can get there with u = symunit L = 10*u.uH; C = 10*u.fF; unitConvert(simplify(unitConvert(1/sqrt((L*C)), u...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
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 ...

environ 5 ans il y a | 2

| A accepté

Réponse apportée
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...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
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 ...

environ 5 ans il y a | 0

Réponse apportée
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...

environ 5 ans il y a | 0

Réponse apportée
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 ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
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. ...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 5 ans il y a | 0

Réponse apportée
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 ...

environ 5 ans il y a | 0

Réponse apportée
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...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
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...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 5 ans il y a | 0

Réponse apportée
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...

environ 5 ans il y a | 0

| A accepté

Réponse apportée
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...

environ 5 ans il y a | 1

| A accepté

Réponse apportée
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 ...

environ 5 ans il y a | 0

Réponse apportée
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...

environ 5 ans il y a | 0

Charger plus