Community Profile

# David Goodmanson

### David Goodmanson

688 total contributions since 2012

View details...

Contributions in
View by

Determining the phase shift from the samples of the sinusoidal wave?
Assuming that w is known, and that you have an identical time array for each of A and B, and that t and B are column arrays, the...

ungefär 10 timmar ago | 0

How to determine time lag by using xcorr ?
Hello Linda, the idea is basically correct, but for two signals of the same length, zero lag is at the center of the resulting ...

ungefär 11 timmar ago | 0

| accepted

Hi h7, I'm guessing that you want to start at 60 degrees and not 60 radians, so try y0 = [60*pi/180;0]; [ts,ys] = ode45(@ph...

ungefär 17 timmar ago | 0

| accepted

one-to-one mapping of a vector based on error bounds
Hi Jonah, x(-14 < x & x < -8) = -13; x(-8 < x & x < -2) = -6; What happens if x =8? Looks like you could use <= in pla...

3 dagar ago | 0

The spacecraft free-fall math model
Hi Sanzhar & Luke, This problem keeps bouncing around on other posts, so it's time to check out what is going on. Although the...

3 dagar ago | 1

How to generate a round robin schedule with 4 players in each game
HI Jacob, here's a standard way to create an n team round robin schedule (n even), teams plays each other once. sched = [mod([...

4 dagar ago | 0

Why does the rotate function let the body rotate around the wrong axis?
Hello Felix, this shold be (assuming that the object's center is at (0,0,0) ) tilt = 23.4; rotationangle = 30; % for example...

5 dagar ago | 0

solve numerically a system of three equations the first of which defines a function and the rest of two involve integrals
Hi YG, Not having the toolbox for fsolve, I can't do any comparison calculations. As is usually the case, there is a tradoff b...

6 dagar ago | 0

Why fft results of discrete Fourier series coefficients are different from the actual definition
Hi Romio, I believe you are referriing to the convention where (informally speaking) f(x) = Sum c_n exp( 2*pi*i*f0*n*x) ...

9 dagar ago | 0

| accepted

How to solve parametric system of vector equations?
Hi Daniel, interesting problem. does this correspond to a particular physical situation? % P1 --> a, P2 --> b % solution i...

11 dagar ago | 1

| accepted

Spline and PPL discrete points
Hi Dhruv. your choice of a = 0.125 is kind of messing things up, because it's well above where the data ends. If you go only ...

12 dagar ago | 0

| accepted

solve numerically a system of three equations the first of which defines a function and the rest of two involve integrals
Hello YG, Fortunately the first equation is amenable to interation, at least for some parameters. In the code below, zeta1 --...

12 dagar ago | 0

| accepted

Trying to graph two differential equations on same plot
Hi Rodrigo, you have the following: function dydt=jallohwfun7(alpha,ep,xf,y,cao,k2,Fao) dydt=zeros(2,1); dydt(1)=-alpha*(1+e...

14 dagar ago | 1

| accepted

How to use tril function on only specific columns in a large matrix?
Hi Zuha, here's another, more vectorized version m = rand(31413,950); [r c] = size(m); [jj ii] = meshgrid(1:c,1:8); % ii ro...

14 dagar ago | 0

Keep getting an error message when integrating
Hi Rodrigo, try adding a dot to the function definition line, for element-by-element division: fun=@(x) Fao/(cao*k2)*(1+ep*x)....

14 dagar ago | 2

| accepted

Solving an ODE for a Complex Variable in Polar Coordinates
Hi Cameron, to solve the differential equation, ode needs real inputs so you could either use z = x+iy in the usual way or use ...

14 dagar ago | 2

| accepted

How to create a function as the convolution of two functions? Thanks
Hello James, fune=@(e)(e>=0).*(e<=1); funz=@(z)(z>=0).*(z<=1); funezt=@(ez,t)fune(ez-t).*funz(t); funez=@(ez)integral(@(t)fu...

14 dagar ago | 1

| accepted

for loop. finding the right index
Hello Ireedui, max and min find the indices as well as the values. changeInSOE = diff(stateOfEnergy) % find all the differen...

15 dagar ago | 1

| accepted

Can I determine the points (x,y) with a single line looping back and cross its self?
Hi A C Good one. I'm assuming that the x and y arrays are such that x(1:end),y(1:end) traces out a 'continuous' (so to speak) ...

23 dagar ago | 1

arc length parametrization help me
Hello HY, You just need to go back to the basics. There is a vector x,y,z defined by a parameter (t in this case), so the rate...

24 dagar ago | 0

How to generate samples for cauchy distribution
Hi Mudit, the Cauchy distribtiion doesn't have a variance, since it doesn't have moments. But it does have a scale factor b. ...

25 dagar ago | 0

Scalar coefficients for a linear combination of matrices
HI Pierre-Luc [M(:) N(:)]\C(:) produces [a;b] This assumes that M and N are not proportional to each other, otherwise there...

27 dagar ago | 0

| accepted

Solving function in Matlab
Hi HD, Never a bad idea to do a plot. I modified the code a bit, so it does vector in with Ms, vector out. Could you explain ...

28 dagar ago | 0

Weird result, why I can't find -0.809 and 0.309 in -1:0.001:1???
Hello JX, you are looking for exact equality with floating point numbers, and a exact equality does not always occur. x = -1:....

29 dagar ago | 0

| accepted

Back-Calculating to Match Previously Established Variable
Hi Jonathan, you don't show the curve y(x), but given the number of points in x it appears that the curve y(x) is dense in poin...

29 dagar ago | 0

TE mode trascendental equation problem
Hi Carolina, do you have a reference for where you read that dielectric fibers have no cutoff frequency? I would be interested...

ungefär en månad ago | 0

Need surface area of fsurf between two planes
<modified> Hi Erin, Here is a totally different method, based on the equation for the cone. It finds the surface area of a co...

ungefär en månad ago | 0

| accepted

Periodic indexing of a matrix
Hi Andrea, for N points, index j, in 1 dimension, fnext largest index = mod(j,N)+1 next smallest index = mod(j-2,N)+1 then...

ungefär en månad ago | 0

Finding the values that make the Jacobian matrix singular?
Hi Missael, there is probablty a way to do this with symbolic variables in Matlab, but it's not necessary because the determina...

ungefär en månad ago | 0

| accepted