Answered
Real and imaginary part of fourier transform using fft.
Hi Venkata, This is close, but you have to make a couple of adjustments. These are y = dy*(-N/2:(N/2-1)).'; . . ...

8 years ago | 1

| accepted

Answered
How to define the spatial frequency in Matlab?
Hi Elango, I want to get the terminology well defined, since in space there is a bit of ambiguity as compared to time, where ...

8 years ago | 1

| accepted

Answered
What is difference between utilization directly N = 1000 with N=100 but calculate FFT of rect with number of points = 1000?
Hello Le Dung A window is of course a function that is large in one area and small in another. Let's take the SECOND CODE fi...

8 years ago | 0

| accepted

Answered
How to solve system of 3rd order differential equations in Matlab
Hi Luis, I am going to assume that r is constant and not a function of theta. One way that could happen is if these equation...

8 years ago | 0

| accepted

Answered
How to vectorize this for loop
Hi serena, I believe this works, assuming that wind_sam is a column vector of length w_sam. The idea is to make an index mat...

8 years ago | 0

Answered
Signal mirror problem in space (time) domain after applying IFFT
Hi Rabindra, As you say since you are removing some high frequencies in the k domain you will get a wider waveform in the r d...

8 years ago | 1

Answered
Unable to generate by code name of file for save command
Hi Tom, Try filename = ['X',num2str(j),'.mat']; save(filename,'variable'); end i.e the name of the variable is in sing...

8 years ago | 1

| accepted

Answered
How to rescale x- axis?
Hi Petronas, If the width of the spiral is proportional to some input value, you can come up with an appropriate constant and...

8 years ago | 0

Answered
Please help me. I have the following point
Hi taylor, The equation for a plane is c1*x + c2*y + c3*z = 1 --> z = (1 - c1*x - c2*y)/c3. From three (nonco...

8 years ago | 0

Answered
Time to frequency domain and back again?
Hi weam, This kind of error occurs all the time. Because of the frequency shift I was interested to see if you had used next...

8 years ago | 1

| accepted

Answered
What am I doing wrong in my Ode?
Hi Matthew, you appear to lacking a second initial condition. With one initial condition of 1000, ode23 assumes that x has onl...

8 years ago | 0

| accepted

Answered
How to do Maclaurin series expension?
Hi Cimpean, If you don't try to evaluate anything at first, syms x tay = taylor(log(1+x),'order',10) gives the pro...

8 years ago | 0

Answered
Something is wrong in the Fourier transform...
Hi Artem, Although Star Strider's fix should work all right, if you have exactly 8 complete years of data I think you will ge...

8 years ago | 0

Answered
I am struck with this code.. i want to solve the following 7 interdependent equations simultaneously ..please help
Hi udita, You have seven equations seven unknowns, but I shall include the first non-numbered equation as well so that you ha...

8 years ago | 0

| accepted

Answered
How to convert spatial frequency from 1/pixels to cycles per degree of visual angle?
Hello Caroline, Although it's unrealistic, suppose for the moment that the spacial frequency is 1 cyc/pixel. For pixels of w...

8 years ago | 1

Answered
finding equations of damped sine wave parameters with givethree data points
Hi Deepak, Although what John says must almost certainly be true in general, there is one special situation where you can get...

8 years ago | 0

| accepted

Answered
hi everyone,I write a code for solving N differential first order coupled equations ,I want to know if there is better way to do it , or more efficient way , thanks
Hi fatema, Here is an alternate ode function. It assumes that cof is NxN, c is a column vector of length N, and energy is a ...

8 years ago | 0

| accepted

Answered
Unable to plot a wavefunction
Hi Sergio, This function appears to have scaling issues. If you plot figure(1) fplot(real(Z), [-2*h, 2*h]) fig...

8 years ago | 1

| accepted

Answered
Calculate windowing correction factor
Hi acegi, I don't think Christoph was guessing. Most of these window functions have adjustable parameters, subject to change...

8 years ago | 0

Answered
Delay sum beamformer linear plot
Hi Anagha, There is no real reason why the two ends of the plot should look the same. Say your elements are numbered 0 to 23...

8 years ago | 0

| accepted

Answered
Fast solution of quadratic matrix equation
Hi Umer, If matrix C is well behaved enough, meaning not too large a condition number, then the following might work [v ...

8 years ago | 2

| accepted

Answered
GIBBS overshoot behavior difference
Hi Jeff, First of all, if you are fourier expanding a function y(x) in the interval [0,1] and its start value y(0) is not equ...

8 years ago | 0

| accepted

Answered
Simpson for odd number of subintervals
Hi Djamel. One approach is to use the usual Simpson's rule for all but three (consecutive) intervals and use Simpson's 3/8 ru...

8 years ago | 1

Answered
How to integrate a modified cfit funciton?
Hi Tsuwei, Here are two related methods. The first way just does a smoothing spline on the new function that you have define...

8 years ago | 0

| accepted

Answered
how to let my code just consider the demical number ??
Hi Muhammad, You need the integer part, and the fix function works: a = 45.789 >> fix(a) ans = 45 >> b = a-fix...

8 years ago | 0

| accepted

Answered
Error with conv function. Using discrete functions but I keep getting an error.
Hi Jasmine, This error does not occur in the latest version of Matlab, but if you have, for example, 2015a, the error is as y...

8 years ago | 0

| accepted

Answered
How to add two probability density functions efficiently
Hi Juan, Here is one way. It takes advantage of the fact that when you make a sparse matrix with repeated indices, the corre...

8 years ago | 1

| accepted

Answered
Associated legendre polynomials fail after certain degree
Hi ailbeildce, Try legendre(n,x,'norm') or legendre(n,x,'sch'). Each of these normalizes the associated legendre function s...

8 years ago | 1

| accepted

Answered
Set vector direction to point away from a closed surface (or a point coordinate)?
Hi LMS, Say you set up a point B in the middle of the volume. Assuming the surface is not excessively curved, from B you sho...

8 years ago | 1

Answered
How to solve these mathematical equations simultaneously?
Hello Luqman Assuming N and n are set beforehand, there are four equations & five unknowns, so one of the unknowns gets to be...

8 years ago | 0

| accepted

Load more