Risposto
Hourly mean for my dataset on electric power consumed
Hello Giulia, This code works. One possible answer: you already have a variable in the workspace named 'mean'. That preemp...

circa 8 anni fa | 0

Risposto
SNR=0 in FFT Plot
perhaps the snr is in dB, in which case signal level = noise level.

circa 8 anni fa | 0

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

circa 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 1

| accettato

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 1

| accettato

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 1

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

oltre 8 anni fa | 1

| accettato

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 0

| accettato

Risposto
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); ...

oltre 8 anni fa | 0

Risposto
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*...

oltre 8 anni fa | 0

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 1

| accettato

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 1

| accettato

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

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 0

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

oltre 8 anni fa | 2

| accettato

Risposto
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*...

oltre 8 anni fa | 0

| accettato

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

oltre 8 anni fa | 0

Carica altro