Beantwortet
Why does bsxfun produce different result than brute force mean?
Hello KAE, I believe that each method has a small problem. In the second method, since length(nRrow) = length(nCol) = 1, the...

mehr als 8 Jahre vor | 2

| akzeptiert

Beantwortet
How to swap values of two variables?
Hi Daniel, Take a look at the 'deal' command, in this case [b a] = deal(a,b)

mehr als 8 Jahre vor | 5

| akzeptiert

Beantwortet
Plot sphere with different resolution in long and lat direction
Hi Peter, There is really not the kind of limitation on surf that you seem to imply. This example shows a sphere with differ...

mehr als 8 Jahre vor | 2

| akzeptiert

Beantwortet
Can MATLAB solve 3 order equation including square root of the variable?
Hello Huan, I don't believe a symbolic solution is possible but if you can live with a numerical solution, then you can take...

mehr als 8 Jahre vor | 1

| akzeptiert

Beantwortet
Single ODE solved with ODE45
Hi Michelle, Looks like your constant of .012528 is off by a factor of 10, should be .12528. Once that change is made, there...

mehr als 8 Jahre vor | 0

Beantwortet
Symmetric Kronecker product in Matlab
Hi Marcelo, Here is an attempt at symmetric kron of square matrices A and B of the same size. The whole task is to make the ...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Gradient vector field not perpendicular to contour map
Hi Cole, I believe this is an artifact of the zoom process. If you zoom in by drawing a rectangle, the axes get scaled diffe...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
Why does zero padding in fourier domain lead to an inverse transform which is complex double?
Hello Sachin, Good idea to work this out as you are doing. I believe that the problem occurs with the very first line of cod...

mehr als 8 Jahre vor | 0

| akzeptiert

Beantwortet
eigenvalues and eigenvectors (different solution between matlab and book) Could you please help me to solve this?
Hi Emmanuel, Eigenvectors are not defined uniquely, in the sense that if v is an eigenvector of M, then any nonzero constant ...

mehr als 8 Jahre vor | 2

| akzeptiert

Beantwortet
A bit complicated matrix multiplication. Is there a easy way out in Matlab?
Hi Mengchen, This method starts with an MxNx3 matrix of rgb values (in your case M = N = 32). It reads out all the red value...

fast 9 Jahre vor | 0

Beantwortet
model of mineral precipitation
Hello Rosalie, I'm not a chemist so I will take your equations as given although log10 and exp don't seem compatible somehow....

fast 9 Jahre vor | 3

| akzeptiert

Beantwortet
How to correspond the color of the curves in the plots to the legend?
Hi Lifei, The commands appear to be correct, aside from the fact that Matlab does not allow variable names such as "2nd" that...

fast 9 Jahre vor | 0

Beantwortet
Calculate integral with an external formula
Hi Lenovo, Your 'if' check is not working correctly, because the res function takes vector input for x. One way to do the ta...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
Res[ ((s^3)*(exp(1/s))) ] in Matlab
Hi Sourav, The function has an essential singularity at s = 0, but you can still expand exp(1/s) in a Taylor series in 1/s, j...

fast 9 Jahre vor | 0

Beantwortet
Probabilistic analysis - failure frequencyseems unreasonable
Hi Peter, For a random variable situation like this one, the probability that strength = force _exactly_ is essentially zero....

fast 9 Jahre vor | 0

Beantwortet
Calculate encircled energy from point spread function
Hi Vanessa, I will assume that the psf is a function of intensity and not amplitude; otherwise you would have to square the p...

fast 9 Jahre vor | 2

| akzeptiert

Beantwortet
convolution of two probability density functions
Hello Abhinav pdfs are continuous functions, so the closer spaced your x points are, the closer you get to the expected answe...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
I'm having trouble drawing lines.
Hi Muhendisleksi, A couple of options. If you swap the for loops around so as to plot the dashed blue lines second, then you...

fast 9 Jahre vor | 0

Beantwortet
the average rate of change of the function to find the derivative
Hello Asma Take a look at the following >> 1:8 ans = 1 2 3 4 5 6 7 8 >> -1:-8 ...

fast 9 Jahre vor | 1

| akzeptiert

Beantwortet
Int function gives strange integral
Hi Abhishek, I believe you meant -cos(x) + 2*sin(x) is expected. The answer you got is equal to -cos(x) + 2*sin(x) -1, so ...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
What are the following operations doing?
Hi y, The expressions [1 2] and [3 4] are sets of indices (expressed as vectors). In the expression A([1 2],[3 4]), the set ...

fast 9 Jahre vor | 0

Beantwortet
how to measure he similarity between two 2D complex fields?
Hi sanjeev, The rms difference is a reasonable measure, but it's not quite what you have. Rms is sqrt(mean(abs((Y1(:)-Y...

fast 9 Jahre vor | 0

Beantwortet
How to get the result of int from -inf to inf
Hi P^2, Interesting problem. The integral is a function of y/sqrt(1+2y^2) which I imaginatively called 'a'. For -inf < y < ...

fast 9 Jahre vor | 0

Beantwortet
what is the mechanism of intersection between two lines ?
Hi sufian, Well, you can find all kinds of code on the internet, and on this forum most people are more likely to provide cod...

fast 9 Jahre vor | 2

Beantwortet
What does this frequency response of an audio signal is explaining?
Hi alia, It appears that the sampling frequency is the standard 44.1 kHz. In that case a 20 sec time record would consist of...

fast 9 Jahre vor | 1

| akzeptiert

Beantwortet
Converting rectangular grids to an array
Hi Alex, The concatenation m = [x_mesh(:) y_mesh(:) z_mesh(:)] gives a 27x3 list of all the points, but not in the or...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
does function "fft" support int16 data type?
Hello L, 2016b works for uint16 but not int16 on input. 2017a works for both int16 and uint16. Presumably the documentation...

fast 9 Jahre vor | 0

Beantwortet
Why isn't the output of an N point FFT discrete ?
Hi Chinmay, If by 'isn't discrete' you are referring to the values in between the peaks, they are basically at the numerical ...

fast 9 Jahre vor | 0

| akzeptiert

Beantwortet
Evaluating Principal Value Integral
Hello fredo, It makes sense to rescale the independent variable using s = y/H ds = dy/H which leads to integr...

fast 9 Jahre vor | 2

Beantwortet
How can I compute the inverse FFT "manually"? How are the FFT wavenumbers ordered?
Hi Alex, On input and output the fft and ifft have an array whose corresponding frequencies are in the order 0:N-1 as implied...

fast 9 Jahre vor | 0

Mehr laden