Answered

How to complete the fourier Analysis using Matlab ?

Try to study and alter this example : Fs=10; t=-3:1/Fs:3; x=exp(-t); plot(t,x) N=1000; % N points for frequency computa...

How to complete the fourier Analysis using Matlab ?

Try to study and alter this example : Fs=10; t=-3:1/Fs:3; x=exp(-t); plot(t,x) N=1000; % N points for frequency computa...

ungefär 8 år ago | 1

Answered

Recover gaussian by using fft and ifft.

Try : G(end)=[]; G=(sqrt(2*pi))*G; figure; plot(t,f,'r',t,G,'g');

Recover gaussian by using fft and ifft.

Try : G(end)=[]; G=(sqrt(2*pi))*G; figure; plot(t,f,'r',t,G,'g');

ungefär 8 år ago | 0

Answered

what is the meaning of? K*(i-1):end

c_t(i,1+K*(i-1):end) means selecting elements identified by *1+K(i-1)* to *end* from matrix c_t in the row *i*, generally *X(...

what is the meaning of? K*(i-1):end

c_t(i,1+K*(i-1):end) means selecting elements identified by *1+K(i-1)* to *end* from matrix c_t in the row *i*, generally *X(...

ungefär 8 år ago | 1

Answered

How to find spectrum envelope from wav file

Hilbert Transformation is used to obtain the envelope of signal, here is an example : The envelope is decreasing exponential...

How to find spectrum envelope from wav file

Hilbert Transformation is used to obtain the envelope of signal, here is an example : The envelope is decreasing exponential...

ungefär 8 år ago | 0

Answered

Identifying wave-number sign after FFT2

The general solution for a wave travelling in the +X direction is, at point X : y(0,t)=A exp(j(wt)) y(X,t)=A exp(j(wt-KX))...

Identifying wave-number sign after FFT2

The general solution for a wave travelling in the +X direction is, at point X : y(0,t)=A exp(j(wt)) y(X,t)=A exp(j(wt-KX))...

ungefär 8 år ago | 1

Answered

about High pass and low pass filter

The syntax for designing low pass filters is : b = fir1(n,Wn,'ftype',window); n is the number of coefficients, Wn is th...

about High pass and low pass filter

The syntax for designing low pass filters is : b = fir1(n,Wn,'ftype',window); n is the number of coefficients, Wn is th...

ungefär 8 år ago | 0

Answered

How do I graph this plane with three points?

you can use geometric construction with meshgrid function or use patch function as follows : patch([1 1 2],[2 2 1],[3 1 0],0...

How do I graph this plane with three points?

you can use geometric construction with meshgrid function or use patch function as follows : patch([1 1 2],[2 2 1],[3 1 0],0...

ungefär 8 år ago | 0

Answered

Wrong "step" function answer

According to the system you described, here the result i obtained : <</matlabcentral/answers/uploaded_files/22588/ST.jpg>> ...

Wrong "step" function answer

According to the system you described, here the result i obtained : <</matlabcentral/answers/uploaded_files/22588/ST.jpg>> ...

ungefär 8 år ago | 0

Answered

Plotting contours of a probability density

You have to use two dimensional arrays of x and z to produce two dimensional pdf, try : [x,z]=meshgrid(-6:0.01:6); r=sqrt...

Plotting contours of a probability density

You have to use two dimensional arrays of x and z to produce two dimensional pdf, try : [x,z]=meshgrid(-6:0.01:6); r=sqrt...

ungefär 8 år ago | 1

Answered

Plotting piece-wise functions with absolute value????

The algorithm you wrote is almost correct, inside the if conditions you need to use x(k), not x : x = linspace (-10,10,100)...

Plotting piece-wise functions with absolute value????

The algorithm you wrote is almost correct, inside the if conditions you need to use x(k), not x : x = linspace (-10,10,100)...

ungefär 8 år ago | 0

Answered

Stand alone C file

If you mean reading a file with C, then you need to use pointer as the following, with apriori knowledge of array dimensions : ...

Stand alone C file

If you mean reading a file with C, then you need to use pointer as the following, with apriori knowledge of array dimensions : ...

ungefär 8 år ago | 0

Answered

Problem in computing the curl of 2D velocity vector field

Generally, the input velocity matrices may contain NaNs, try : sum(isnan(UU(:))); % must be zero if there is no NaN, same fo...

Problem in computing the curl of 2D velocity vector field

Generally, the input velocity matrices may contain NaNs, try : sum(isnan(UU(:))); % must be zero if there is no NaN, same fo...

ungefär 8 år ago | 0

Answered

matlab triple integral conical gravity

I think that working with symbolic variables will not permit the transformation of integral expressions to numeric type, however...

matlab triple integral conical gravity

I think that working with symbolic variables will not permit the transformation of integral expressions to numeric type, however...

ungefär 8 år ago | 0

Answered

Correlation between two images ..

if you mean correlation coefficient, you can program manually the function or use corr2 : corr2(A,B); % returns a scalar...

Correlation between two images ..

if you mean correlation coefficient, you can program manually the function or use corr2 : corr2(A,B); % returns a scalar...

ungefär 8 år ago | 0

Answered

I can I duplicate raws of variables?

try this standard method a=[1:3]; b=[]; for n=1:6 b=[b a]; end

I can I duplicate raws of variables?

try this standard method a=[1:3]; b=[]; for n=1:6 b=[b a]; end

ungefär 8 år ago | 0

| accepted

Solved

Nearest Numbers

Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

ungefär 8 år ago

Solved

Create a row array using double colon operator

Create a row array from 9 to 1, using the double colon operator.

ungefär 8 år ago

Solved

Circle area using pi

Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

ungefär 8 år ago

Solved

Sum all integers from 1 to 2^n

Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

ungefär 8 år ago

Problem

Test if a matrix is symmetric

Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

ungefär 8 år ago | 1 | 114 solvers

Answered

How to apply velocity + acceleration to a position?

@Roger gave the solution (Vx,Vy) . try to write a feedback of this solution. t=0:100e-3:20; V0x=1000; Alpha=0.0004; Beta...

How to apply velocity + acceleration to a position?

@Roger gave the solution (Vx,Vy) . try to write a feedback of this solution. t=0:100e-3:20; V0x=1000; Alpha=0.0004; Beta...

ungefär 8 år ago | 0

| accepted

Answered

SVD & EVD of a Symmetric Matrix

Floating points problems occur as mentioned by @Jhon, you can verify if your matrix M is symmetric or not : norm(M-M') % mus...

SVD & EVD of a Symmetric Matrix

Floating points problems occur as mentioned by @Jhon, you can verify if your matrix M is symmetric or not : norm(M-M') % mus...

ungefär 8 år ago | 0

Answered

How to apply velocity + acceleration to a position?

You can verify this primary solution theoretically : t=0:100e-3:20; V0x=1000; Alpha=0.0004; Beta=0.25; Vx=...

How to apply velocity + acceleration to a position?

You can verify this primary solution theoretically : t=0:100e-3:20; V0x=1000; Alpha=0.0004; Beta=0.25; Vx=...

ungefär 8 år ago | 0

Answered

Time series syntax question

ts(i,1) means performing calculation of the elements of first column of matrix ts, ts(i,2) means the ith element on the second c...

Time series syntax question

ts(i,1) means performing calculation of the elements of first column of matrix ts, ts(i,2) means the ith element on the second c...

ungefär 8 år ago | 0

Answered

I have a question about RESAMPLE

This is an interesting remark, however in Documentation, it was mentioned that re-sampling has side effect because of filterin...

I have a question about RESAMPLE

This is an interesting remark, however in Documentation, it was mentioned that re-sampling has side effect because of filterin...

ungefär 8 år ago | 0

| accepted

Answered

I have a sine function y = a*sin(bx+c)+d and I have 4 points on the function: P1(0.835,0.720) P2(1.498,0.589) P3(2.866,0.236) P4(3.299,0.649)?

hi, if you have Math symbolic ToolBox, you can use the function solve, the output is a structure with symbolic variables : ...

I have a sine function y = a*sin(bx+c)+d and I have 4 points on the function: P1(0.835,0.720) P2(1.498,0.589) P3(2.866,0.236) P4(3.299,0.649)?

hi, if you have Math symbolic ToolBox, you can use the function solve, the output is a structure with symbolic variables : ...

ungefär 8 år ago | 0

| accepted

Answered

Integrating with trapz and calculate the error

The first remark is that names of built in functions must not be used as variables ( trapz in this case ), second remark is *int...

Integrating with trapz and calculate the error

The first remark is that names of built in functions must not be used as variables ( trapz in this case ), second remark is *int...

ungefär 8 år ago | 0

Answered

Computing first derivative--image processing

In general diff(X,n) of N by 1 vector returns an N-n by 1 vector, second derivative is diff(X,2), using gradient is better beca...

Computing first derivative--image processing

In general diff(X,n) of N by 1 vector returns an N-n by 1 vector, second derivative is diff(X,2), using gradient is better beca...

ungefär 8 år ago | 0

Answered

Using loglog for plotting a logarithmic graph

You have to use element wise operator ( . before any operator sign) : x = 10:19700; y=96818.90647.*sqrt(55327.8644...

Using loglog for plotting a logarithmic graph

You have to use element wise operator ( . before any operator sign) : x = 10:19700; y=96818.90647.*sqrt(55327.8644...

ungefär 8 år ago | 0

| accepted