Answered

How to make error bars on double bar graph?

I have no idea when XEndPoints and YEndPoints was introduced, however it was relatively recently (within the last few years). ...

How to make error bars on double bar graph?

I have no idea when XEndPoints and YEndPoints was introduced, however it was relatively recently (within the last few years). ...

10 días ago | 0

| accepted

Answered

Best Text/number location on the plot

One approach is to use the legend position after using the 'Location','best' name-value pair, and then interpolating the relativ...

Best Text/number location on the plot

One approach is to use the legend position after using the 'Location','best' name-value pair, and then interpolating the relativ...

10 días ago | 0

| accepted

Answered

How to customize a colormap?

Another option — cm = colormap(turbo(6)); cm = colormap(flipud(turbo(6))); % Optional cb ...

How to customize a colormap?

Another option — cm = colormap(turbo(6)); cm = colormap(flipud(turbo(6))); % Optional cb ...

10 días ago | 0

| accepted

Answered

exctract data from 50 curves in .fig

The argument to openfig should be a single .fig file, so supply the appropriate information for ‘filename’ here. Other than t...

exctract data from 50 curves in .fig

The argument to openfig should be a single .fig file, so supply the appropriate information for ‘filename’ here. Other than t...

10 días ago | 0

Answered

Looking for a way to copy an IGOR Pro function in MatLab

You can do something similar with something like this (that I have turned into a funciton) — x = linspace(0, 10*pi, 250); y =...

Looking for a way to copy an IGOR Pro function in MatLab

You can do something similar with something like this (that I have turned into a funciton) — x = linspace(0, 10*pi, 250); y =...

11 días ago | 1

| accepted

Answered

How can I remove harmonics from my spectrogram?

If you know the frequency of the fundamental (that is what I assume you are referring to), use the bandpass function on the time...

How can I remove harmonics from my spectrogram?

If you know the frequency of the fundamental (that is what I assume you are referring to), use the bandpass function on the time...

11 días ago | 0

Answered

How to find the maximum value of C that corresponds to a set of X,Y coordinates?

The spectrogram plot is actually a surf plot with the view set to display it looking from the top, so the ‘Z’ values will give y...

How to find the maximum value of C that corresponds to a set of X,Y coordinates?

The spectrogram plot is actually a surf plot with the view set to display it looking from the top, so the ‘Z’ values will give y...

11 días ago | 1

| accepted

Answered

How do I convert a specific string to a date ?

Note the Comment by @Stephen23. That aside, try this— DT = datetime('22-07-04T013:09:42Z', 'InputFormat','dd-MM-yy''T''HHH:...

How do I convert a specific string to a date ?

Note the Comment by @Stephen23. That aside, try this— DT = datetime('22-07-04T013:09:42Z', 'InputFormat','dd-MM-yy''T''HHH:...

12 días ago | 0

| accepted

Answered

Interpolation for x,y,z values

The data in the file do not appear to resemble the data in the image. For those, the fillmissing function (R2016b and later r...

Interpolation for x,y,z values

The data in the file do not appear to resemble the data in the image. For those, the fillmissing function (R2016b and later r...

12 días ago | 0

| accepted

Answered

Plot 2D surf from 3 columns (X, Y, Data)

Try something like this — Tmag = readtable('FileName', 'VariableNamingRule','preserve'); x = Tmag{:,1}; y = Tmag{:,2}; z = ...

Plot 2D surf from 3 columns (X, Y, Data)

Try something like this — Tmag = readtable('FileName', 'VariableNamingRule','preserve'); x = Tmag{:,1}; y = Tmag{:,2}; z = ...

12 días ago | 0

Answered

How to extract a value/s from a matrix that match with specific rows

One possibility is to use the findgroups function to select the appropriate rows, then use that to index into the data. type ...

How to extract a value/s from a matrix that match with specific rows

One possibility is to use the findgroups function to select the appropriate rows, then use that to index into the data. type ...

12 días ago | 0

| accepted

Answered

Does the initial population matrix have to satisfy constraints genetic algorithm matlab

The initial population matrix does not have to satisfy the constraints. Subsequent generations will, at least in my experienc...

Does the initial population matrix have to satisfy constraints genetic algorithm matlab

The initial population matrix does not have to satisfy the constraints. Subsequent generations will, at least in my experienc...

12 días ago | 0

Answered

What frequency range does fft compute?

The first element of the output of the fft function is the constant or DC offsets (mean values) of the original time domain vect...

What frequency range does fft compute?

The first element of the output of the fft function is the constant or DC offsets (mean values) of the original time domain vect...

12 días ago | 0

| accepted

Answered

Multiply only certain columns in a matrix with a constant

Another approach — M = rand(5,9) % Shorter Version Of 'M' c = 1000; ...

Multiply only certain columns in a matrix with a constant

Another approach — M = rand(5,9) % Shorter Version Of 'M' c = 1000; ...

12 días ago | 0

| accepted

Answered

Index exceeds the number of array elements. Index must not exceed 0.

A variable with zero elements is empty. The error could be referring to the empty first argument in the function call.

Index exceeds the number of array elements. Index must not exceed 0.

A variable with zero elements is empty. The error could be referring to the empty first argument in the function call.

12 días ago | 0

Answered

Bode diagram for a Butterworth filter

Use the freqz function — Fs = 60; % Sampling Frequency Fn = Fs/2; ...

Bode diagram for a Butterworth filter

Use the freqz function — Fs = 60; % Sampling Frequency Fn = Fs/2; ...

12 días ago | 0

Answered

Plot ODE45 data in a surface

One option for creating a surface from two vectors is to multiply the transpose of one with the other so that the first vector i...

Plot ODE45 data in a surface

One option for creating a surface from two vectors is to multiply the transpose of one with the other so that the first vector i...

14 días ago | 0

Answered

Not really understanding why cdata isn't working

The ‘cdata’ matrix only exists if you create it. See the heatmap documentation section Create Heatmap from Matrix Data for de...

Not really understanding why cdata isn't working

The ‘cdata’ matrix only exists if you create it. See the heatmap documentation section Create Heatmap from Matrix Data for de...

14 días ago | 0

Answered

Select zone of the plot

This can certainly be done, however it is definitely not trivial! Try this — LD = load('Miguel Albuquerque azimuth3.mat'); ...

Select zone of the plot

This can certainly be done, however it is definitely not trivial! Try this — LD = load('Miguel Albuquerque azimuth3.mat'); ...

14 días ago | 0

| accepted

Answered

What is Symbolic Math Toolbox and how to get it

For a description, see Symbolic Math Toolbox. Getting it depends on what type of license you have (university, individual, et...

What is Symbolic Math Toolbox and how to get it

For a description, see Symbolic Math Toolbox. Getting it depends on what type of license you have (university, individual, et...

14 días ago | 1

| accepted

Answered

Plot electric field in plane

Try this — M1 = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1077575/data.txt') [U1,ix1] = uniq...

Plot electric field in plane

Try this — M1 = readmatrix('https://www.mathworks.com/matlabcentral/answers/uploaded_files/1077575/data.txt') [U1,ix1] = uniq...

14 días ago | 0

| accepted

Answered

Filter data through a bandpass FIR

That’s a problem with FIR filters, simply because in most instances they tend to be very long vectors. Use an IIR filter inst...

Filter data through a bandpass FIR

That’s a problem with FIR filters, simply because in most instances they tend to be very long vectors. Use an IIR filter inst...

14 días ago | 0

Answered

How to find inverse of filter such that product of filter and its inverse results in a flat spectrum

The easiest way to find out is to do the experiment — Fs = 1E+5; t = linspace(0, 1E+5, 1E+6)/Fs; fc = [1 2 4]*1E+4; s = sum...

How to find inverse of filter such that product of filter and its inverse results in a flat spectrum

The easiest way to find out is to do the experiment — Fs = 1E+5; t = linspace(0, 1E+5, 1E+6)/Fs; fc = [1 2 4]*1E+4; s = sum...

14 días ago | 0

Answered

MATLAB fixing dates that are flipped

The first variable is imported as a cell character array, so it has to be changed to a datetime array for the rest of this to wo...

MATLAB fixing dates that are flipped

The first variable is imported as a cell character array, so it has to be changed to a datetime array for the rest of this to wo...

15 días ago | 0

| accepted

Answered

Shading Between Two Lines

It would be easier with your data. Assuming that all the vectors are coiumn vectors — HH = linspace(4, 20).'; LWAC = 10*(1...

Shading Between Two Lines

It would be easier with your data. Assuming that all the vectors are coiumn vectors — HH = linspace(4, 20).'; LWAC = 10*(1...

15 días ago | 0

Answered

How to extract wandering baseline

There are several options, however the one I usually use is first to calculate the Fourier transform of the signal using the fft...

How to extract wandering baseline

There are several options, however the one I usually use is first to calculate the Fourier transform of the signal using the fft...

15 días ago | 0

Answered

How to set up Paris Law Integral

Since ‘K’ is a funciton of ‘x’ it needs to be created as an anonymous function, and for whatever reason, the integrand ‘fun’ cre...

How to set up Paris Law Integral

Since ‘K’ is a funciton of ‘x’ it needs to be created as an anonymous function, and for whatever reason, the integrand ‘fun’ cre...

16 días ago | 1

| accepted

Answered

How to extract corresponding x axis value in improfile.

Try this (using an example from the improfile documentation) — I = imread('liftingbody.png'); x = [19 427 416 77]; y = [9...

How to extract corresponding x axis value in improfile.

Try this (using an example from the improfile documentation) — I = imread('liftingbody.png'); x = [19 427 416 77]; y = [9...

16 días ago | 1

| accepted

Answered

From a matrix creating a vector

Use the unique and accumarray or histcounts functions. This appears to be homework, so I leave the coding to you.

From a matrix creating a vector

Use the unique and accumarray or histcounts functions. This appears to be homework, so I leave the coding to you.

17 días ago | 0

| accepted

Answered

Count the number of "aggregate" peaks in a vector?

I am not certain what result you want. Here, findpeaks finds 21 distinct spikes (and their locations) LD = load('buzzerData...

Count the number of "aggregate" peaks in a vector?

I am not certain what result you want. Here, findpeaks finds 21 distinct spikes (and their locations) LD = load('buzzerData...

17 días ago | 1

| accepted