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

8 years ago | 2

| accepted

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

8 years ago | 1

| accepted

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

8 years ago | 0

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

8 years ago | 0

| accepted

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

8 years ago | 0

| accepted

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

8 years ago | 0

| accepted

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

8 years ago | 2

| accepted

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

8 years ago | 0

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

8 years ago | 3

| accepted

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

8 years ago | 0

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 0

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

8 years ago | 2

| accepted

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 1

| accepted

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 0

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

8 years ago | 0

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

8 years ago | 2

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

8 years ago | 1

| accepted

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

8 years ago | 0

| accepted

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

8 years ago | 0

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

8 years ago | 0

| accepted

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

8 years ago | 2

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

8 years ago | 0

Answered
Take all possible combinations for more than 15 elements
Hello shipra, If I understand this correctly, you want to find all possible combinations of the 65 elements of A taken 3 at a...

8 years ago | 0

Answered
How to create randomly placed points within a 3D figure?
Hello Frankie, You have to select random points that are inside the heart and fortunately you already have the function that ...

8 years ago | 1

| accepted

Load more