Beantwortet
Solving Matrix elements by using while iteration in Matlab
Hello nut, I suppose you could figure a convoluted way to use a while loop if you dreamed up some iterative process and stopped...

etwa 9 Jahre vor | 1

| akzeptiert

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

etwa 9 Jahre vor | 0

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

etwa 9 Jahre vor | 1

| akzeptiert

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

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 0

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

etwa 9 Jahre vor | 1

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

etwa 9 Jahre vor | 1

| akzeptiert

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

etwa 9 Jahre vor | 1

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

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 0

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

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 1

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

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 3

| akzeptiert

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

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 1

| akzeptiert

Beantwortet
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, ...

etwa 9 Jahre vor | 0

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

etwa 9 Jahre vor | 0

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

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 0

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

etwa 9 Jahre vor | 1

| akzeptiert

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

etwa 9 Jahre vor | 0

| akzeptiert

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

etwa 9 Jahre vor | 0

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

etwa 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 1

Beantwortet
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,...

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 2

| akzeptiert

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

mehr als 9 Jahre vor | 0

| akzeptiert

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

mehr als 9 Jahre vor | 0

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

mehr als 9 Jahre vor | 4

| akzeptiert

Mehr laden