11,957 total contributions since 2012

Hic sunt dracones!

PROFESSIONAL: Physician (M.D.): Diplomate of the American Board of Internal Medicine; M.Sc. Biomedical Engineering: Instrumentation, Signal Processing, Control, System Identification, Parameter Estimation

NON-PROFESSIONAL: Amateur Extra Class Amateur Radio Operator; Private Pilot, Airplane Single Engine Land, Instrument Rating Airplane; Gamer

NOTE: I do not respond to emails or personal messages, unless they are about my File Exchange contributions.

Answered

How can I generate equal visual witdh bars with bar graph and log absciss scale ?

See: How to creat nonlinear bin histogram/bar plot with same Bar width? (link) for an example.

How can I generate equal visual witdh bars with bar graph and log absciss scale ?

See: How to creat nonlinear bin histogram/bar plot with same Bar width? (link) for an example.

5 hours ago | 0

Answered

morse code encoder with sound

An oldie but a goodie was the morspeak function that I originally downloaded from the File Exchange in the mid-1990s. (I didn’t...

morse code encoder with sound

An oldie but a goodie was the morspeak function that I originally downloaded from the File Exchange in the mid-1990s. (I didn’t...

6 hours ago | 0

Answered

Is it possible to plot several graphs with separate axis on the same figure? I want to compare different waveforms in one figure.

You’ve not described what you want to do, or the result you want. A guess might be to use the yyaxis (link) function (introduce...

Is it possible to plot several graphs with separate axis on the same figure? I want to compare different waveforms in one figure.

You’ve not described what you want to do, or the result you want. A guess might be to use the yyaxis (link) function (introduce...

7 hours ago | 0

Answered

How to plot Butterworth filters with own data?

It would help to know the sizes of ‘x’ and ‘h’. You should also have a time vector, so: figure plot(t, h) grid will plot...

How to plot Butterworth filters with own data?

It would help to know the sizes of ‘x’ and ‘h’. You should also have a time vector, so: figure plot(t, h) grid will plot...

14 hours ago | 0

Answered

Plotting different filtering functions WITH DATA

‘Can I use "plot" to plot my data with this filter and if so how?’ Yes. It depends on what you want to plot. To plot your...

Plotting different filtering functions WITH DATA

‘Can I use "plot" to plot my data with this filter and if so how?’ Yes. It depends on what you want to plot. To plot your...

14 hours ago | 0

Answered

Remove negative numbers and rows from an array

Your ‘data_flume’ array has some inconsistencies that prevented the use of cellfun for everything, so a loop is necessary to scr...

Remove negative numbers and rows from an array

Your ‘data_flume’ array has some inconsistencies that prevented the use of cellfun for everything, so a loop is necessary to scr...

16 hours ago | 0

Answered

Gap in spectral analysis (Filter applied)

I suspect you are actually using a lowpass filter, then using fftshift on the fft output, although not adjusting the frequency a...

Gap in spectral analysis (Filter applied)

I suspect you are actually using a lowpass filter, then using fftshift on the fft output, although not adjusting the frequency a...

21 hours ago | 0

Answered

ODE45 how can I format this system of equations?

Try this: function vd = YourODE(t,v,K1,K2,m1,m2,P,R1,R2,x1,x2) xd1 = v(1); xd2 = v(2); vd(1,:) = (1/m1) * (P - R1*(xd1 - xd...

ODE45 how can I format this system of equations?

Try this: function vd = YourODE(t,v,K1,K2,m1,m2,P,R1,R2,x1,x2) xd1 = v(1); xd2 = v(2); vd(1,:) = (1/m1) * (P - R1*(xd1 - xd...

1 day ago | 0

Answered

How to generate a matrix with number of lines inserted from keyboard

You had too many end statements. They were defining very short if blocks, and so some of those blocks did not begin correctly a...

How to generate a matrix with number of lines inserted from keyboard

You had too many end statements. They were defining very short if blocks, and so some of those blocks did not begin correctly a...

1 day ago | 0

| accepted

Answered

Why is ODE45 using so many intervals?

It will use as many intervals as it needs to. If you want it to output fewer intervals, create ‘tspan’ as a vector of more th...

Why is ODE45 using so many intervals?

It will use as many intervals as it needs to. If you want it to output fewer intervals, create ‘tspan’ as a vector of more th...

1 day ago | 1

| accepted

Answered

for loop to get results for each iteration

Your loop is not doing anything except copying your original vectors to new vectors. Try something like this instead: Eedma...

for loop to get results for each iteration

Your loop is not doing anything except copying your original vectors to new vectors. Try something like this instead: Eedma...

1 day ago | 0

Answered

Save each vector (of different length) produced by a for loop

I’m not certain what you’re doing. I would do something like this: H{m(p),n(p)} = find(time_dec > m(p) & time_dec < n(p)); ...

Save each vector (of different length) produced by a for loop

I’m not certain what you’re doing. I would do something like this: H{m(p),n(p)} = find(time_dec > m(p) & time_dec < n(p)); ...

1 day ago | 1

| accepted

Answered

how to make new variables and values in for loop

Please do not create numbered variables! If you want varying values for different iterations, subscript ‘A’ instead: A(i) =...

how to make new variables and values in for loop

Please do not create numbered variables! If you want varying values for different iterations, subscript ‘A’ instead: A(i) =...

1 day ago | 0

| accepted

Answered

Problem with plotting a phase response of a time-series data FFT

See if using the unwrap function on the phase vector (in radians, before transforming it to degrees) has the desired effect. ...

Problem with plotting a phase response of a time-series data FFT

See if using the unwrap function on the phase vector (in radians, before transforming it to degrees) has the desired effect. ...

2 days ago | 1

Answered

Problems in opening/importing .asc files with headers.

I was able to read it with this: filename = 'rdata_001.asc'; fido = fopen(filename,'r'); D = textscan(fido, repmat('%s',1, 6...

Problems in opening/importing .asc files with headers.

I was able to read it with this: filename = 'rdata_001.asc'; fido = fopen(filename,'r'); D = textscan(fido, repmat('%s',1, 6...

2 days ago | 0

| accepted

Answered

In Simbiology, is the parameter estimates reliable, if I get the error " Iteration limit exceeded in the Laplacian algorithm. Returning result of the final iteration"

For that function, you can use the options created by the statset function to increase the number of iterations MaxIter beyond t...

In Simbiology, is the parameter estimates reliable, if I get the error " Iteration limit exceeded in the Laplacian algorithm. Returning result of the final iteration"

For that function, you can use the options created by the statset function to increase the number of iterations MaxIter beyond t...

2 days ago | 0

| accepted

Answered

Slope of experimental data

To get the instantaneous slope of your data: dydx = gradient(y1) ./ gradient(x); then to plot it: plot(x, dydx) The gradie...

Slope of experimental data

To get the instantaneous slope of your data: dydx = gradient(y1) ./ gradient(x); then to plot it: plot(x, dydx) The gradie...

2 days ago | 0

Answered

convert dates in matlab

Try this: D = xlsread('dates.xlsx'); Ds = num2str(D,'%d'); Dn = datenum(Ds, 'yyyymmdd'); Check = datevec(Dn) ...

convert dates in matlab

Try this: D = xlsread('dates.xlsx'); Ds = num2str(D,'%d'); Dn = datenum(Ds, 'yyyymmdd'); Check = datevec(Dn) ...

2 days ago | 0

| accepted

Answered

Linear indices from row and column indices for a rectangular region of interest.

You need to reverse the order of the second and third arguments to sub2ind: indices = sub2ind(size(a), X(:), Y(:)) %this would...

Linear indices from row and column indices for a rectangular region of interest.

You need to reverse the order of the second and third arguments to sub2ind: indices = sub2ind(size(a), X(:), Y(:)) %this would...

2 days ago | 1

| accepted

Answered

Find intersectionpoint between two functions

Add this line just before the plot calls: intx = (m2 - m3) / (k3 - k2); % X-Intersection and add: plo...

Find intersectionpoint between two functions

Add this line just before the plot calls: intx = (m2 - m3) / (k3 - k2); % X-Intersection and add: plo...

2 days ago | 1

| accepted

Answered

How do you section data that has peaks and troughs

I noticed that visually, the frequency content of the ‘walking’ and ‘running’ segments were different, and while I had problems ...

How do you section data that has peaks and troughs

I noticed that visually, the frequency content of the ‘walking’ and ‘running’ segments were different, and while I had problems ...

3 days ago | 0

Answered

Find maximum in matrix and show

If I understand correctly what you want to do, use the max (link) function. To get the maximum of every column of your matrix...

Find maximum in matrix and show

If I understand correctly what you want to do, use the max (link) function. To get the maximum of every column of your matrix...

3 days ago | 0

Answered

FIR and IIR EEG signal

See: How do I eliminate multiple 60Hz harmonics within 1 set of data in an ECG and Help With Starting Point for a Low Pass Filte...

FIR and IIR EEG signal

See: How do I eliminate multiple 60Hz harmonics within 1 set of data in an ECG and Help With Starting Point for a Low Pass Filte...

3 days ago | 0

Answered

How to plot an integral

‘But nothing comes out on the graph.’ The result of the int function is a constant. At best, you will get a straight line. ...

How to plot an integral

‘But nothing comes out on the graph.’ The result of the int function is a constant. At best, you will get a straight line. ...

4 days ago | 0

| accepted

Answered

random numbers can be divided b

Try this: r5 = randi(10,1,20)*5; % Creates 20 Random Integers From 5 To 50, All Of Which Can Be Divided E...

random numbers can be divided b

Try this: r5 = randi(10,1,20)*5; % Creates 20 Random Integers From 5 To 50, All Of Which Can Be Divided E...

4 days ago | 0

| accepted

Answered

How to plot contour without interpolation on a nonuniform grid?

Have you experimented to see how contour (or contourf) works with your data? Did the function throw an error? If not, just l...

How to plot contour without interpolation on a nonuniform grid?

Have you experimented to see how contour (or contourf) works with your data? Did the function throw an error? If not, just l...

4 days ago | 0

Answered

add numbers to an array correspondingly

Use bsxfun: A = [ 6 10 14 ]; B = [0.0152 0.0134 0.0120 0.0121 0.0109 0.0100 0.0089 0.0084 0...

add numbers to an array correspondingly

Use bsxfun: A = [ 6 10 14 ]; B = [0.0152 0.0134 0.0120 0.0121 0.0109 0.0100 0.0089 0.0084 0...

4 days ago | 0

Answered

Index exceeds the number of array elements (10), How do I solve this error??

Five lines above it, you initialise the for loop as: for xx=1:11 Perhaps: for xx=1:10 will eliminate the error

Index exceeds the number of array elements (10), How do I solve this error??

Five lines above it, you initialise the for loop as: for xx=1:11 Perhaps: for xx=1:10 will eliminate the error

4 days ago | 0

Answered

How to separate matrix elements based on randomized indices

If you want, you can do it without an expressed loop (the accumarray function of course loops internally): a = randi(9,2,10); ...

How to separate matrix elements based on randomized indices

If you want, you can do it without an expressed loop (the accumarray function of course loops internally): a = randi(9,2,10); ...

4 days ago | 0