Réponse apportée
What is the Fourier transform of an Airy Disc?
[modified answer] Hi elham, The Fourier transform of the Airy intensity pattern is the autocorrelation of the aperture disks...

environ 9 ans il y a | 0

Réponse apportée
Ignoring extra legend entries?
Hello Charlotte, you should be getting a pretty strange graph right now, since it would be plotting x vs y1 and then y2 vs y3. ...

environ 9 ans il y a | 1

| A accepté

Réponse apportée
Matrices in a matrix
Hi UGO, should your top row read R11, R12, R13? at any rate, try z = zeros(size(A)); C = [A z z;z A z;z z A]; B = C...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
How can I get the 3d coordinates of a point by having its distance to some other points with known coordinates?
Hello payman, here is one way to accomplish this. There are always two solutions, given by the two row vectors s, which are re...

environ 9 ans il y a | 0

Réponse apportée
Diagonally dominant matrix with high condition number
Hello othello, yes. a = [2e5 .1; .1 1]; cond(a) ans = 2.0000e+05

environ 9 ans il y a | 1

Réponse apportée
Why do I get a different Phase graph, when using FFT versus hand calculations?
Hello Peter, This is pretty close and it definitely helps that it was complete working code. There are just a couple of thin...

environ 9 ans il y a | 1

| A accepté

Réponse apportée
creating random dense symmetric matrix with desired condition number
[modified to address the first comment below] Hi othello, I don't know about built-in functions but there are ways to make y...

environ 9 ans il y a | 1

Réponse apportée
In for loop, add same fractional value to all non-integers in the vector
HI balsip, try for i = 1:length(A)

environ 9 ans il y a | 0

| A accepté

Réponse apportée
Finding the tan inverse for different range of values
Hello AK, consider the following two situations, where all phi obey -pi<angle<pi : case x phi1x = pi - pi/20 phi...

environ 9 ans il y a | 0

Réponse apportée
Fast method count unique variables
Revised answer. For a 7e6 x 30 matrix this takes about 2.7 sec on my PC. m8 = uint8(m); u1 = uint8(1); ncol = size(m...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
Correct reasoning of error propagation?
Hi Nicki, First off, you only see the values of h rounded to four decimal places. You can help your cause quite a bit by using...

environ 9 ans il y a | 1

Réponse apportée
Numerical Methods to solve Equation
Hi Razi, the usual procedure is to use the 'break' condition start with a value (an initial value may or may not be needed...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
fft function returns NaN from non-NaN input
Hi Yuwei, you did check for NaNs but not for any values that equal +-infinity, and there are three of them: >> find(isinf(...

environ 9 ans il y a | 3

| A accepté

Réponse apportée
How can i solve this problem ?
Hello Razi, The problem occurs in the statement x(i+1) = (3*x(i)+0.5)^(1/3) The (3x+1/2) part is negative for x <...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
How to specify the colors within a colorbar
Hi Carolyn, All you need do is change the colormap line to colormap(sort(Color, 'descend')); but make sure that you ha...

environ 9 ans il y a | 1

| A accepté

Réponse apportée
weird rounding error?
Yes, it's interesting that for some tasks such as addition and subtraction of quantities with a fixed number of decimal digits, ...

environ 9 ans il y a | 0

Réponse apportée
How to take advantage of the TRIANGULAR structure of a matrix when solving a linear system involving it?
Hello Joao, if you go to 'doc \' you can see an overview of backslash. The algorithm checks for triangularity right at the beg...

environ 9 ans il y a | 0

Réponse apportée
weird rounding error?
Hi Jason, this is just Computer Science 101. Since computers have only so many bits to describe floating point numbers, there ...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
Fixed-displacement pump friction torque vs pressure gain coefficient
Hi Tom, If you convert units from cm^3/rev to m^3/rad, then the value itself picks up a factor of 1e-6/(2*pi) = 1.5915e-07, an...

environ 9 ans il y a | 0

Réponse apportée
How do I convert a 3D RGB image to a grayscale image using the intensity formula (intensity=0.2989*red + 0.5870*green + 0.1140*blue)?
Hi Janel, Given your first three lines that define red green and blue, if you just take the appropriate sum of those as in your...

environ 9 ans il y a | 1

| A accepté

Réponse apportée
Formula not returning array
Hello Ian, you forgot to put a dot in front of the divide sign: ./ in order to create element-by-element division.

environ 9 ans il y a | 0

| A accepté

Réponse apportée
I am stuck in a question
Hello Arslan, (I checked this by ode45 but the principle should be the same). You are solving dy/dt = (1-y)*exp(-.1*y). For a...

environ 9 ans il y a | 0

Réponse apportée
How to generate mixed exponential distribution random number using the command in MATLAB?
Hello Noor, The function below agrees with the function cited above for several choices of parameters that I have tried. For 1...

environ 9 ans il y a | 0

Réponse apportée
Double Integral using Integral2 Error
Hi jack, I believe this is occurring because your definition of myfun_eqn8 uses the two variables z,phi, but the integrand m1.*...

environ 9 ans il y a | 1

Réponse apportée
Can I find the inverse of a sparse matrix faster?
Hi Staf, Before attempting something as large as T = 2000 it's never a bad idea to try the same thing for T just a bit smaller,...

environ 9 ans il y a | 0

Réponse apportée
Construct phase spectrum before IFFT
Hi Roderick, I see that what I said about dividing your angles by a factor of 2*length(...) was incorrect because that factor w...

environ 9 ans il y a | 2

| A accepté

Réponse apportée
How to stop a graph going below zero in
Hello Matui, several ways to do this. If you want to keep the x and y arrays the same length as they are, you could use the fi...

environ 9 ans il y a | 0

| A accepté

Réponse apportée
How to pull values out of a matrix using another matrix?
Hello Tudor, Here is one way: indx = find(matrix1==0) matrix2(indx) = 0 This works because 'find' looks at the eleme...

environ 9 ans il y a | 0

Réponse apportée
Spectrum of fm modulaton
Hello AbdAlla, The generation of a real fm signal is not a linear process, but there is no problem with finding the resulting s...

environ 9 ans il y a | 4

| A accepté

Réponse apportée
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...

environ 9 ans il y a | 1

| A accepté

Charger plus