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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

Respondida
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;

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

Respondida
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)

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 1

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 2

| aceptada

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

más de 9 años hace | 0

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

| aceptada

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

más de 9 años hace | 2

| aceptada

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

más de 9 años hace | 1

| aceptada

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

más de 9 años hace | 0

| aceptada

Cargar más