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

oltre 7 anni fa | 2

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 0

| accettato

Risposto
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 = (...

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 4

| accettato

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

oltre 7 anni fa | 1

| accettato

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

oltre 7 anni fa | 2

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

Risposto
(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...

oltre 7 anni fa | 2

| accettato

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

oltre 7 anni fa | 0

| accettato

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

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

oltre 7 anni fa | 0

Risposto
how to rotate coordiante system about Z axis first then rotate about about the new Y axis.
Hi Yang, Suppose you have rotation matrices Rx = [1 0 0 Ry = [c 0 -s Rz = [c -s 0 0 c -s 0 ...

oltre 7 anni fa | 0

| accettato

Risposto
Radioactive Decay from Atom 1 to Atom 2 to Atom 3
Hi says, This is pretty close. In your expression for N_2, there is a misplaced right parenthesis. The factor in front is s...

oltre 7 anni fa | 0

Carica altro