Answered

Zero crossings and separation of data

Use the envelope function to define the ‘outline’ of the upper portion of the signal (and the lower portion if you want that), t...

Zero crossings and separation of data

Use the envelope function to define the ‘outline’ of the upper portion of the signal (and the lower portion if you want that), t...

10 days ago | 0

| accepted

Answered

Issue with velocity signal from measurement

First, if you want to eliminate noise, use a lowpass filter, and if you have a significant amount of baseline offset or baseline...

Issue with velocity signal from measurement

First, if you want to eliminate noise, use a lowpass filter, and if you have a significant amount of baseline offset or baseline...

10 days ago | 0

| accepted

Answered

ode with varying constant

Interpolating a time-domain vector in a differential equation is essentially described in the ode45 (and other solvers) document...

ode with varying constant

Interpolating a time-domain vector in a differential equation is essentially described in the ode45 (and other solvers) document...

10 days ago | 0

Answered

Calculate shifts/translation between two curves

The blue curve is not ‘shifting’. It has a different scale with respect to the independent variable than the purple curve. The...

Calculate shifts/translation between two curves

The blue curve is not ‘shifting’. It has a different scale with respect to the independent variable than the purple curve. The...

10 days ago | 0

| accepted

Answered

Index exceeds the number of array elements (10).

In this line: A(i)=(x(i+3)-x(i))*((y(i)+3*y(i+1)+3*y(i+2)+y(i+3))/8); ↑ ← HE...

Index exceeds the number of array elements (10).

In this line: A(i)=(x(i+3)-x(i))*((y(i)+3*y(i+1)+3*y(i+2)+y(i+3))/8); ↑ ← HE...

10 days ago | 0

Answered

Unable to perform assignment because the left side is 1-by-3 and the right side is 1-by-2

I’m not certain what you’re doing with that line. The standard way of coding it (to put errorbar objects or text objects at t...

Unable to perform assignment because the left side is 1-by-3 and the right side is 1-by-2

I’m not certain what you’re doing with that line. The standard way of coding it (to put errorbar objects or text objects at t...

10 days ago | 0

| accepted

Answered

Why does my code only come out with one result?

Call it as: [siftedData, siftedMean, siftedStd, siftedNorm] = project2(rawData, categories, selectedCategory) and all the ou...

Why does my code only come out with one result?

Call it as: [siftedData, siftedMean, siftedStd, siftedNorm] = project2(rawData, categories, selectedCategory) and all the ou...

11 days ago | 0

| accepted

Answered

How to add error bars to a bar graph

See: error bars in bar plot with categories for one example.

How to add error bars to a bar graph

See: error bars in bar plot with categories for one example.

11 days ago | 0

| accepted

Answered

How do I use an unusual base in a semilogx plot?

See if this works for what you want to do: x = 1:5; y = 1.85.^x; figure subplot(2,1,1) semilogx(x, y) ...

How do I use an unusual base in a semilogx plot?

See if this works for what you want to do: x = 1:5; y = 1.85.^x; figure subplot(2,1,1) semilogx(x, y) ...

11 days ago | 0

Answered

converting abbreviation of months to numerical value

Another approach: mnth_nr = @(mth) find(strcmpi(mth, {'jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'}...

converting abbreviation of months to numerical value

Another approach: mnth_nr = @(mth) find(strcmpi(mth, {'jan','feb','mar','apr','may','jun','jul','aug','sep','oct','nov','dec'}...

11 days ago | 0

Answered

How to get upper and lower bounds values from an empirical cumulative distribution?

Using the prctile funciton on ‘cdf_y’ may work to calculate the percentiles (that appear to be what you want). To get the appro...

How to get upper and lower bounds values from an empirical cumulative distribution?

Using the prctile funciton on ‘cdf_y’ may work to calculate the percentiles (that appear to be what you want). To get the appro...

11 days ago | 1

| accepted

Answered

Plot not showing line fully

There may be some problem with the graphics rendering. See if an update to your graphics driver is available. Otherwise, add...

Plot not showing line fully

There may be some problem with the graphics rendering. See if an update to your graphics driver is available. Otherwise, add...

11 days ago | 0

| accepted

Answered

Complex number to polar form

Use the abs (magnitude) and angle (radian phase angle) functions. The phasor notation for it would be: phasor = [abs(z) ang...

Complex number to polar form

Use the abs (magnitude) and angle (radian phase angle) functions. The phasor notation for it would be: phasor = [abs(z) ang...

11 days ago | 0

Answered

Understanding the FFT documentation

Your understanding essentially equates to my understanding of fft. It produces a ‘two-sided’ Fourier transform with the first v...

Understanding the FFT documentation

Your understanding essentially equates to my understanding of fft. It produces a ‘two-sided’ Fourier transform with the first v...

11 days ago | 0

| accepted

Answered

Making graph at the every for loop

First, if you are defining each plot in a separate figure, remove the figure call in the loop and put it before the loop. Jus...

Making graph at the every for loop

First, if you are defining each plot in a separate figure, remove the figure call in the loop and put it before the loop. Jus...

11 days ago | 0

Answered

How do I add variables into a string within a table?

The only option appears to be to turn the string variable into a char array first: str = "0001336363"; strc = char(str); Out...

How do I add variables into a string within a table?

The only option appears to be to turn the string variable into a char array first: str = "0001336363"; strc = char(str); Out...

11 days ago | 0

| accepted

Answered

Computing findpeaks along 3-Dimensional matrix

I am guessing here, since I do not have your data. Since findpeaks is going to return vectors for the peaks, locations (and oth...

Computing findpeaks along 3-Dimensional matrix

I am guessing here, since I do not have your data. Since findpeaks is going to return vectors for the peaks, locations (and oth...

12 days ago | 0

Answered

Fill in a Polar Scatter Plot

Do everything in Cartesian coordinates, although defining the coordinates in terms of and . Then, use pol2cart to create them ...

Fill in a Polar Scatter Plot

Do everything in Cartesian coordinates, although defining the coordinates in terms of and . Then, use pol2cart to create them ...

12 days ago | 0

Answered

finding the exact points of Zero crossing using interpolation method

You are plotting the values of the data at the indices that ‘zci’ returns, not the interpolated aero-crossings. It would be b...

finding the exact points of Zero crossing using interpolation method

You are plotting the values of the data at the indices that ‘zci’ returns, not the interpolated aero-crossings. It would be b...

12 days ago | 0

| accepted

Answered

how do i find minimum value of function with matlab?

I agree with you that using the diff function is the appropriate way to begin.

how do i find minimum value of function with matlab?

I agree with you that using the diff function is the appropriate way to begin.

12 days ago | 0

Answered

Can't plot polyfit

The polyfit function also needs to know what degree of polynomial you want to fit: p = polyfit(x,y,n) where ‘n’ is the degree...

Can't plot polyfit

The polyfit function also needs to know what degree of polynomial you want to fit: p = polyfit(x,y,n) where ‘n’ is the degree...

12 days ago | 0

| accepted

Answered

Matlab code and filterDesigner give different plots for the same setting of Chebyshev II bandpass filter?

I suspect that filterDesigner uses the second-order-section implementation of the filter. You should, as well. Change: [...

Matlab code and filterDesigner give different plots for the same setting of Chebyshev II bandpass filter?

I suspect that filterDesigner uses the second-order-section implementation of the filter. You should, as well. Change: [...

12 days ago | 0

| accepted

Answered

How to find the width of plotted graph at selected Y-axis level?

Try this: lambda = linspace(0.4, 0.6); % Wavelength Vector s = sinc(((0.47:0.02:0....

How to find the width of plotted graph at selected Y-axis level?

Try this: lambda = linspace(0.4, 0.6); % Wavelength Vector s = sinc(((0.47:0.02:0....

12 days ago | 1

| accepted

Answered

how to get the value of x, from this equation: 0.2exp(x)-x^(0.25) = 0

I do not understand what the problem is: fun = @(x) (0.2*exp(x)-x.^(0.25)); x0 = [1.5,0]; x = fsolve(fun,x0); xv = linspac...

how to get the value of x, from this equation: 0.2exp(x)-x^(0.25) = 0

I do not understand what the problem is: fun = @(x) (0.2*exp(x)-x.^(0.25)); x0 = [1.5,0]; x = fsolve(fun,x0); xv = linspac...

13 days ago | 0

Answered

2 Scenario Legend Setup

See the Line Properties documentation on DisplayName. That might do what you want.

2 Scenario Legend Setup

See the Line Properties documentation on DisplayName. That might do what you want.

13 days ago | 0

Answered

Change datetime display format

It is possible. It just takes some coding gymnastics: tj = 2.456870501842000e+06; mtime = datetime(tj,'ConvertFrom','juliand...

Change datetime display format

It is possible. It just takes some coding gymnastics: tj = 2.456870501842000e+06; mtime = datetime(tj,'ConvertFrom','juliand...

13 days ago | 1

Answered

how to get a cdf plot of my data

Try this: [f,x,flo,fup] = ecdf(fitness); figure loglog(x, f) hold on plot(x, [flo fup], '--r') hold off grid legend('...

how to get a cdf plot of my data

Try this: [f,x,flo,fup] = ecdf(fitness); figure loglog(x, f) hold on plot(x, [flo fup], '--r') hold off grid legend('...

13 days ago | 0

| accepted

Answered

Displaying random numbers as a graph

One approach is to use the inpolygon function: x = linspace(0, 10); y = exp(-(x-5).^2)*0.2; r = rand(1000,2).*[10 0.25]; [i...

Displaying random numbers as a graph

One approach is to use the inpolygon function: x = linspace(0, 10); y = exp(-(x-5).^2)*0.2; r = rand(1000,2).*[10 0.25]; [i...

14 days ago | 1

| accepted

Answered

Creating a Filter and applying it

See: Realize or Apply the Filter to Input Data

Creating a Filter and applying it

See: Realize or Apply the Filter to Input Data

14 days ago | 1

| accepted