Réponse apportée
Incorrect xcorr results from matlab r2017a signal processing toolbox?
Hi Peter, The difference is that corrcoef does its calculations about the mean and xcorr does not. If you add the line ...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
how to explain that integral(sqrt,0.5,1) does not work?
Hi YZ, try integral(@sqrt,.5,1) It's syntax ...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Finding the area under a semilogy plot with straight line segments
Hi Arun, You have four intervals, each defined by start and end points (x1,y1) and (x2,y2). In each interval, y is of the fo...

environ 8 ans il y a | 0

Réponse apportée
Computing frequency from phase angle. How to remove the frequency spikes?
Hi Jan, The angle function is restricted to -pi < angle < pi, so in your first plot the angle has a series of sudden jumps fr...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
Finding Accurate Amplitude Using FFT
Hi Andy, When I run your code I get 14.5 for the answer, so I am not sure how you are getting 54.8. But the 14.5 is consiste...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
I want to plot a numerical integral which is dependent of x and y as the z-value in a surface plot. How can I do this?
Hi Elke, The integral is just the Matlab normcdf function. With the supplied values the following code gives a plot that is ...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
shifted summation (sliding window) without loop for high dimension vectors?
Hello Ca Parvulus, Here is a method that shifts the 50 columns rather than the 4e6 rows. To get your code to work I had to...

environ 8 ans il y a | 0

Réponse apportée
how to get a value using integral
Hello Jongnam, try format long fun = @(x) x.^(7/2)./(sqrt(x-1)) integral(fun,0,1) ans = 0.000000000000000 - 0.8...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
eul2rotm missmatch why?
Hello Wouter, I don't have the robotics toolbox, but in the documentation for eul2rotm it says: "When using the rotation m...

environ 8 ans il y a | 0

Réponse apportée
Plotting irregular volume of given vertices.
Hi syham, Here is an example using patch. n = 6; x = rand(1,n); y = rand(1,n); z = rand(1,n); k = convhu...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
FFT of a sinusoidal function
Hi Francesco, For an N-point fft, the usual way to set up the time and frequency arrays of step size dt and df is dt = 1/F...

environ 8 ans il y a | 1

Réponse apportée
Calculating effective area in Soccer
Hi William, The algorithm draws a lot of triangles with players at the vertices. I appears that the final result for P is th...

environ 8 ans il y a | 1

| A accepté

Réponse apportée
Incorrect phase from fourier transform
Hi Nathan, If you check you will see that the difference between random_phase and phase is always either 0 or 2pi. This is b...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
How to write program for [A(drager)^n, A^n].
Hi Samrat, You can't represent Adag and A by finite-dimensional matrices. Let's assume adag and a are NxN matrices that have...

environ 8 ans il y a | 0

Réponse apportée
Getting a plot to wrap from right to left
Hi Bill, You have six points whose real starting point is evidently at x = -65. The idea here is to take the two leftmost x ...

environ 8 ans il y a | 0

| A accepté

Réponse apportée
Solving (x*y)^y == gamma((x+2)*y)/gamma((x+1)*y) for integer values of x.
Hello Christopher, N = 100; soln = zeros(1,N) for x = 1:N fun = @(y) (x*y)^y - gamma((x+2)*y)/gamma((x+1)*y); ...

environ 8 ans il y a | 0

Réponse apportée
how to fin dalta from this equation
Hello Hussein, A plot of the equation shows that there are three real roots: x = -2:.001:6; figure(1) y = x + 1.6*...

environ 8 ans il y a | 0

Réponse apportée
how to make a function (named pcc ) that solves the cartesian product of 2 strings A(with n elements) and B(with m elements)?
Hi Cosmin, If by 'strings' you mean vectors of characters then there are questions about how to accomplish multiplication. I...

environ 8 ans il y a | 0

Réponse apportée
Say I have a loglog plot, how could I add diagonal lines of 45 and 135 degrees onto the plot?
Hi Mark, If by 45 degrees you mean one y decade per x decade, regardless of the aspect ratio of the plot, then x = [1 1e...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
FFT of Gaussian Pulse in Time Domain
Hello Francesco, It appears that you are looking for the kind fft normalization that approximates a Fourier transform. If th...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
Matrix dimensions must agree. How can i fix it?
Hi Guiseppe, You need to do ./ (dot divide) rather than / (divide). That way each element of the denominator is independentl...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
Why does my code for frequency analysis work only with signals obtained by the combination of sinusoids?
Hi Edoardo, Is there is something going on in your code so that you are not looking at the fft that you think you are looking...

plus de 8 ans il y a | 0

Réponse apportée
concatenating vectors generated with loop
Hi alpedhuez, define output2 by putting output2 = []; just before the do loop. Unless you are using the intermediate...

plus de 8 ans il y a | 1

| A accepté

Réponse apportée
Say I have 6 values of length of the antenna.How do I plot each radiation pattern corresponding to the lengths in a single polar plot?
Hi Soumyadeep, Do you have version 2016a or later? If so you can replace polar(t,E) with polarplot(t,E) and get the right re...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How do I get all solutions of the equation cos(x)==cos(3x) using solve() from Symbolic Math Toolbox ?
Hi Angelo, You didn't go wrong, it's missing half of the roots. But this works h(x)=sin(x+pi/2)==sin(3*x+pi/2); go f...

plus de 8 ans il y a | 0

Réponse apportée
Chebyshev polynomials of the first kind
Hi Asli If you get the do loop out of the code so that the three lines for n=0:6 pol=toplam + 2.*(x).*cheby(n-1,x)-cheb...

plus de 8 ans il y a | 2

| A accepté

Réponse apportée
How to adjust the period of a sawtooth graph
Hi Audrey, you want to have the sawtooth start over at x = 1, but the sawtooth function starts over when its argument gets to 2*...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How do I rearrange this transfer function to be in negative powers of z using matlab?
Hi Zach, if you divide numerator and denominator by z^-4 you obtain (2 -5*(z^-1) +13.48*(z^-2) -7.78*(z^-3) +9*(z^-4))/(4 ...

plus de 8 ans il y a | 0

Réponse apportée
Why does my acceleration scope in an impact simulation accelerate to 1300 m/s^2 for the first .0004s of impact when the velocity is only 4 m/s?
Hi Ryan, Actually the acceleration could have been a lot larger. Suppose del_v = is the change in velocity in the time inter...

plus de 8 ans il y a | 0

| A accepté

Réponse apportée
How to compute the mean amplitude of each frequency across trials?
Hi Becky, I assume you have trials changing down, time changing across (each row is a trial as a function of time). The firs...

plus de 8 ans il y a | 0

| A accepté

Charger plus