Beantwortet
Maximum value of a normalized power changes
Hi pos, First of all, if you want to approximate the area, that's done with intervals and not with points. Just summing the ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
Can someone tell me why my error is so large for my composite simpsons rule?
Hi Briyahna, Yes the Simpson's rule expression is wrong, but only in the typo sense of having a misplaced parenthesis. Inste...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
CDF for Loglogistic distribution
Hello ZC, They are equivalent. In Matlab cdf = e^z / (1+e^z) % the missing one pdf = (1/(si...

mehr als 7 Jahre vor | 2

| akzeptiert

Beantwortet
Problem with drag in Ballistic Calculator
Hi John, I wonder a bit about the units and dimensions, but let's say they are good. There is a problem with FD, as you surm...

mehr als 7 Jahre vor | 0

Beantwortet
Lower and upper incomplete gamma function
Hi Shashibhushan, A couple of things. First, the calling variable order to gammainc needs to be reversed. Second, Matlab ga...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
fft of even number of elements of pulse yields one or multiple zeros in the array. How do I avoid this?
Hi Keith, This is happening because the array length of 16 (after you zerofill) and a pulse length of 4 have a factor in comm...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How to find the number of occurrences of each pair in a matrix?
Hi MSK, nrow = size(A,1); B = A(:); s1 = full(sparse(B(1:end-nrow),B(nrow+1:end),1)) puts instances if i,j into ...

mehr als 7 Jahre vor | 0

Beantwortet
I am trying to apply DCT compression on an image 1024 *1024 but I want to divide this image into 8*8 sub blocks. How can I divide this image to 8*8 sub blocks? can anybody help me please
Hi John, Here is one approach. For 8x8 blocks, you basically have a 256x256 matrix where each 'element' is an 8x8 block. Th...

mehr als 7 Jahre vor | 0

Beantwortet
1d Convolution using Matlab's conv() function
Hi B^3S, Your last example, the one you are having problems with, is incorrect. You should be using [1 2 1 3 1] but you are ...

mehr als 7 Jahre vor | 0

Beantwortet
How to do a phase shift of a signal from FFT output data
Hi matteo, MODIFIED here is an approximate way to do this. The code below stays with the entire frequency array, rather t...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
How do I make my function identify the root of a function within an interval?
Hi NS, You need to take a look at how this algorithm could fail. If f(x0) and f(x1) have opposite signs, then one or the othe...

mehr als 7 Jahre vor | 0

Beantwortet
Does logint function work well? (for PNT)
Hi Notae, The reason for this is something that Derbyshire relegated to a footnote several pages before (p. 335, 128). If yo...

mehr als 7 Jahre vor | 1

| akzeptiert

Beantwortet
FFT gives different amplitudes for different freqeuncies
Hi Fabio, Good observation. The reason for this is when there are an exact integer number of cycles in the time record, you ...

mehr als 7 Jahre vor | 0

| akzeptiert

Beantwortet
How do I get the value of the associated Legendre function P^n_m(x) where P^n_0(x) is the Legendre polynomial?
Hi Kevin, If try, say legendre(5,.1) you get an output vector for all values of m <=5.

mehr als 7 Jahre vor | 0

Beantwortet
Finding frequency of noise signal using FFT
Hi Nhat Dinh, Your frequency grid is basically correct. Unfortunately you are right. With a sampling frequency of only 10 H...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
How do find the frequency from a FFT graph?
Hi Aidil, if there are N points in the data array, then the frequency array consists of N points with spacing fs/N. The foll...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
How can I perform Fourier Synthesis with cosine waves?
Hi Julius Every fourier series is potentially a sum of both sines and cosines. It so happens that the much-overused square w...

fast 8 Jahre vor | 1

| akzeptiert

Beantwortet
RLC Transfer Function Magnitude and Phase Response
Hi 2e9, I don't know why you feel that the resonant circular frequency (w) should be 3.55e6 since 1/sqrt(L*C) = 2.24e7. The ...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to find the equation of a straight line in 3D?
Hi Federico, Are you looking for a parametric description? It's constructive. p1 = rand(1,3) p2 = rand(1,3) u = (...

fast 8 Jahre vor | 1

| akzeptiert

Beantwortet
create random diagonalisable matrix
Hi Gary, another way: n = 7 % A is nxn m = 9 % random integers from 1 to m X = randi...

fast 8 Jahre vor | 4

| akzeptiert

Beantwortet
How to permute a row vector based on sepecfic method for permutation?
Hi Sarah, Since you have more than 28 elements in the final array I would not call it a permutation of elements, strictly spe...

fast 8 Jahre vor | 1

| akzeptiert

Beantwortet
Appending trailing zeros to integers in a vector
Hi Maamoun, try x = [2, 13, 901, 5, 18, 7, 112, 5931]; y = floor(log10(x)) xnew = x.*10.^(max(y)-y)

fast 8 Jahre vor | 2

| akzeptiert

Beantwortet
transfer function of a geometry to match another identical geometry
Hi Hamid, Do you need the actual sequence of rotations around the x,y, and z axes, or do you just need a 3x3 matrix that gets...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
How can I get a Fourier-limited Gaussian pulse
Hi Andi, The issue here is that for a voltage pulse the fourier transform is done on the linear voltage function y(t) to prod...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
How to obtain RGB triplet of scatter points from the colorbar in scatter plot
Hello Nam Tran, I believe this is done in the following way, assuming a colormap of size 64x3 and that c is provided: cm...

fast 8 Jahre vor | 0

Beantwortet
(a + b) + c ≠ a + (b + c)
Hi peluca6, try 0.1 0.2 0.3 These situations are not hard to find. If you just take three random floating point numbers...

fast 8 Jahre vor | 2

| akzeptiert

Beantwortet
How can I create paths relative to a specific folder to facilitate moving project folders to other locations?
Hi Adriel, Here's one approach, concatenation % give the path a short name, the idea is on the computer you only have to...

fast 8 Jahre vor | 0

| akzeptiert

Beantwortet
mod(a,b) floating-point rounding error
Hi Jeff, This is definitely a floating point issue. After running the code, x(3,121) -.2 ans = -5.551115123125783e-1...

fast 8 Jahre vor | 0

Beantwortet
Writing a complicated equation in
Hello Rebeca, Matlab does have a lambertw function, so you can use it to solve this. First of all, since b is known, one c...

fast 8 Jahre vor | 0

Beantwortet
Semipositive definite matrix for quadratic term has a convex quadratic fucntion
Hi J.J. m = [0 0;1 2]; x = [-3;1]; >> x'*m*x ans = -1 positive semidefinite? no. A matrix is positive semi...

fast 8 Jahre vor | 0

Mehr laden