Beantwortet
Recursive function for replacing multiple for loops
Hello Ameer, suppose you have d for loops, which means d independent variables i,j,k, ... then your expression reduces to p^d...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
Element wise mean produces an incorrect result
hello manuel, What's going on is that for whatever reason, the sum in the third dimension of all your slices equals zero within ...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Quad Function Error for Integrals
Hello Adriel, you are missing some dots to make element-by-element division and exponentiation happen y1 = quad('x.^2 +2*x...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
Relative position of a point with respect to centroid
Hello Blue The relative position is the coordinates of the point in question minus the 'with respect to' point which in this ca...

mehr als 9 Jahre vor | 0

Beantwortet
How to find eigenvalues of problem that dont have the form of standard eigenvalue problem?
Hi Mehdi, I can't address whether there would be a successful solution, and there may well be better algorithms available now t...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
matrix manipulation : ind of wanted rows and columns stocked in a vector
Hi Lila, you just have to make an index vector: B = [1 3]; C = A(B,B) The row index is the first listed and the col...

mehr als 9 Jahre vor | 0

Beantwortet
Continuous convolution and the (inverse) FFT
Hi Thomas, I started out with the continuous transform as well, so going to the discrete form took some getting used to. The b...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Solving system of equations with three unknowns?
Hi Jason, there seems to be something funny about these equations. If you eliminate V from the first two, you can show that Re*...

mehr als 9 Jahre vor | 0

Beantwortet
Is there a way to remove the nested for loops from this segment of code? I'm trying to make the code generic so it can take in n-number of moment arrays.
Hello Joseph, I believe this does what you want. It assumes you have a 3d array called momentarray, containing an arbitrary nu...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
how to plot sigmoid activation curve for sodium channel
Hello best16, I am certainly no expert but I believe it's the _conductance_ that has a sigmoid curve vs. voltage. A plot of pe...

mehr als 9 Jahre vor | 0

Beantwortet
"expression to the left of the equals sign is not a valid target" error
Hello Audrey, I believe the problem is actually on the preceding line where you are missing a square parenthesis ] at the end of...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
add nans so all arrays in 3d matrix have same dimensions
Hi m, To make each of them 60 columns, for example: nrows = size(m,2); m(:,nrows+1:60)= nan;

mehr als 9 Jahre vor | 0

Beantwortet
Unexpected complex coefficients in a matrix
Hello Javier, The only opportunity here to get a complex number is if the argument of the log term is negative. For all the no...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
conversion of binary to decimal
Hi ablaze, Your code has bin2dec trying to convert a string containing the word 'binary'. Try a = '1011' bin2dec(a)

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Removed how do i
Hi jay, It looks like I is giving you the number of columns and J the number of rows. But i is your row index and j is your co...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
Geodetic to cartesian coordinates
Hello Benedict, (revised) The four points do form a pretty good rectangle, but it doesn't look like it because the x and y a...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
How do I find the x values at the point of intercept between two quadratic functions numerically?
Hello V, Or, you could simply do A1 = [a1 b1 c1]; % for a1 x^2 + b1 x + c1 A2 = [a2 b2 c2]; % for a...

mehr als 9 Jahre vor | 1

Beantwortet
Unwrap with tolerance other than default (=pi)
Hello pSchi, from 'doc unwrap': Note A jump tolerance less than π has the same effect as a tolerance of π. For a tolerance ...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Sorting an n x n matrix in the Jordan form.
Hello Mohammad, I believe the following code works for a given Jordan matrix J. a = sort(diag(J),'descend'); d = diff(a...

mehr als 9 Jahre vor | 0

Beantwortet
Seeking guidance in log scaled colorbar display error
Hi AMart, It appears that the problem is, since log(0) = -inf, you are effectively saying caxis([-inf, log10(1.5)]). If you c...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Solving the generalized eigenvalue problem A*V = B*V*D with A and B being Hermitian gives COMPLEX eigenvalues.
Hello Jen-Hao, What is your source of information that the general eigenvalue problem for Hermitian A,B has real eigenvalues? ...

mehr als 9 Jahre vor | 0

Beantwortet
The easiest way to add a line of determined slope to a loglog
Hello Ivan, A straight line of slope -5/3 on a loglog plot has the form log(y) = (-5/3)*log(x) + b with an arbitrary constant b...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
How to vectorize this function?
Hello Quinten, a standard way to do this is to make a vector of zeros the same length as 'position', then make a logical index v...

mehr als 9 Jahre vor | 0

Beantwortet
Physically correct Normalization of fft + Implementing Parseval's Theorem
Hello fgb Here is a revised answer that attempts to better address the issue. I believe there are a couple of things going o...

mehr als 9 Jahre vor | 2

| akzeptiert

Beantwortet
How to do numerical integration using Matlab and how to plot it?
Hi Deema, (Having looked at and benefited from the comments so far I will take this answer in a slightly different direction). ...

mehr als 9 Jahre vor | 0

Beantwortet
Predicting initial angle of projectile
Hello Swera, what you show here is actually not so bad, except that your range of angles is a lot more than you need. If the out...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
Summation Using For Loop
Hi vaninea, Don't forget that you are calculating pi^3/32, not pi! Espi equals (appoximately) pi^3/32, so you need to work bac...

mehr als 9 Jahre vor | 0

| akzeptiert

Beantwortet
Help with Method of Moments, Surface Charge on Plate
Hi Matthew, I believe the basic problem has to do with the representation of voltage and charge. You have a 10x10 grid of poin...

mehr als 9 Jahre vor | 2

| akzeptiert

Beantwortet
MATLAB- ifft of simple lowpass filter returns NaN
Hello Nathan, I believe the problem is because the frequency grid contains the point f=0, and your expression for tf comes up w...

mehr als 9 Jahre vor | 1

| akzeptiert

Beantwortet
Ripples in Fourier Transform
Hi Aman, You don't say what your x array was, but I believe the effect occurs because that array has finite width and cuts of...

mehr als 9 Jahre vor | 0

| akzeptiert

Mehr laden