답변 있음

how can I improve this code???!!!

You should try preallocating margin before the loop. You have only set the value to one element, of zero. Since it's not clear h...

how can I improve this code???!!!

You should try preallocating margin before the loop. You have only set the value to one element, of zero. Since it's not clear h...

약 18시간 전 | 2

| 수락됨

답변 있음

Finding series/pattern in an array

If you have the signal processing toolbox you can do this pretty easily using the functions risetime and pulsewidth. You just ha...

Finding series/pattern in an array

If you have the signal processing toolbox you can do this pretty easily using the functions risetime and pulsewidth. You just ha...

약 22시간 전 | 0

답변 있음

Asking the error of 'Out of memory'

You are trying to allocate memory to a matrix for more memory than is available in your RAM. The solution completely depends upo...

Asking the error of 'Out of memory'

You are trying to allocate memory to a matrix for more memory than is available in your RAM. The solution completely depends upo...

1일 전 | 1

답변 있음

how to plot quiver evenly along lines?

I just took a closer look and it is what I suspected. In your loop over NL1 you are only storing the outputs, D1 and D2, for the...

how to plot quiver evenly along lines?

I just took a closer look and it is what I suspected. In your loop over NL1 you are only storing the outputs, D1 and D2, for the...

1일 전 | 1

답변 있음

Linspace with varying increment

MATLAB provides functions that do basic things, like create linearly spaced vectors using the colon operator or linspace. It is ...

Linspace with varying increment

MATLAB provides functions that do basic things, like create linearly spaced vectors using the colon operator or linspace. It is ...

2일 전 | 1

| 수락됨

답변 있음

Problem of finding lag when using xcorr

Yes, running this gives a max lag at 0. That is indicating that y matches x the best in their current positions. Shifting y by a...

Problem of finding lag when using xcorr

Yes, running this gives a max lag at 0. That is indicating that y matches x the best in their current positions. Shifting y by a...

2일 전 | 1

답변 있음

decrease calculation accuracy to speed up running time

The reason your algorithm is taking so much time is because of the line COPT(u+1,:)=[]; What happens when you delete an entry ...

decrease calculation accuracy to speed up running time

The reason your algorithm is taking so much time is because of the line COPT(u+1,:)=[]; What happens when you delete an entry ...

2일 전 | 4

| 수락됨

답변 있음

RLC Circuit Equation Implementation-Runge Kutta

Instead of this derriv_value = L*y(3)+R*y(2)+(1/C)*y; Do you mean this? derriv_value = L*y(3)+R*y(2)+(1/C)*y(1);

RLC Circuit Equation Implementation-Runge Kutta

Instead of this derriv_value = L*y(3)+R*y(2)+(1/C)*y; Do you mean this? derriv_value = L*y(3)+R*y(2)+(1/C)*y(1);

2일 전 | 1

| 수락됨

답변 있음

Question about printing ode45 results

You have the vectors time, and u1d (etc) outside of the ode45 call. And you also have the output t from the ode45 call. So,you c...

Question about printing ode45 results

You have the vectors time, and u1d (etc) outside of the ode45 call. And you also have the output t from the ode45 call. So,you c...

2일 전 | 1

답변 있음

Output of mscohere function

Yes, these are the coherence values between the two channels at the frequencies returned in F. You can manually set the frequenc...

Output of mscohere function

Yes, these are the coherence values between the two channels at the frequencies returned in F. You can manually set the frequenc...

2일 전 | 1

| 수락됨

답변 있음

Integration of Velocity data to Displacement

Use |cumtrapz| as in displacement = cumtrapz(velocity)/fs; % where fs is your sampling rate Then you can assess afterwar...

Integration of Velocity data to Displacement

Use |cumtrapz| as in displacement = cumtrapz(velocity)/fs; % where fs is your sampling rate Then you can assess afterwar...

2일 전 | 1

답변 있음

How to change ONLY Xtick direction (or Ytick direction)

You have to set the properties of the specific axis. figure plot(1:10) ax = gca; xax = ax.XAxis; % xax = get(ax,'XAxis'); ...

How to change ONLY Xtick direction (or Ytick direction)

You have to set the properties of the specific axis. figure plot(1:10) ax = gca; xax = ax.XAxis; % xax = get(ax,'XAxis'); ...

3일 전 | 1

| 수락됨

답변 있음

lines are not continuous

It's not perfect, but it might be sufficient. That's up to you. Play with the different values for dipreset. You might want to s...

lines are not continuous

It's not perfect, but it might be sufficient. That's up to you. Play with the different values for dipreset. You might want to s...

3일 전 | 1

| 수락됨

답변 있음

remove outliers form timeseries

If timevector is the name of your datetime vector, then you can mask out the outliers using timevector_good = timevector(~TF); ...

remove outliers form timeseries

If timevector is the name of your datetime vector, then you can mask out the outliers using timevector_good = timevector(~TF); ...

3일 전 | 1

| 수락됨

답변 있음

Creating a color map of green and blue

Perhaps one of these colormap functions by Chad Greene would be useful to you: https://www.mathworks.com/matlabcentral/fileexch...

Creating a color map of green and blue

Perhaps one of these colormap functions by Chad Greene would be useful to you: https://www.mathworks.com/matlabcentral/fileexch...

3일 전 | 0

답변 있음

How to remove the background noise from a signal?

Seems like you have determined what you want your threshold to be. You can set those values to zero (or whatever the mean of y...

How to remove the background noise from a signal?

Seems like you have determined what you want your threshold to be. You can set those values to zero (or whatever the mean of y...

3일 전 | 1

| 수락됨

답변 있음

How can I remove the default transparency of graph edges?

set(P,'EdgeAlpha',1);

How can I remove the default transparency of graph edges?

set(P,'EdgeAlpha',1);

3일 전 | 1

| 수락됨

답변 있음

How can I find the width of the peaks when presented with a digital signal-like plot?

Use the pulsewidth function with the argument MidPercentReferenceLevel set to 0 or 1 (the lowest value). Here is an example: x ...

How can I find the width of the peaks when presented with a digital signal-like plot?

Use the pulsewidth function with the argument MidPercentReferenceLevel set to 0 or 1 (the lowest value). Here is an example: x ...

3일 전 | 1

| 수락됨

답변 있음

using variables in a parfor loop

I think it's because you're using d as the source and the sink in your loop, and you're assigning to d in a way that can make pr...

using variables in a parfor loop

I think it's because you're using d as the source and the sink in your loop, and you're assigning to d in a way that can make pr...

5일 전 | 0

답변 있음

Is there a way to use different sets of input arguments for one function?

It just requires you to check the type of each input argument. I think it would be easier to use a struct (or even an object) wi...

Is there a way to use different sets of input arguments for one function?

It just requires you to check the type of each input argument. I think it would be easier to use a struct (or even an object) wi...

5일 전 | 2

| 수락됨

답변 있음

EEG is a voltage signal in time domain (voltage amplitude vs time). how can we convert this EEG into amplitude vs frequency?

To convert from the time domain to the frequency domain, use the *fft* function. Though you might actually get more use out of t...

EEG is a voltage signal in time domain (voltage amplitude vs time). how can we convert this EEG into amplitude vs frequency?

To convert from the time domain to the frequency domain, use the *fft* function. Though you might actually get more use out of t...

5일 전 | 1

답변 있음

EEG data preprocessing in matlab and EEGLAB

It seems pretty clear what the differences are. F is using a different file format. Choose your favourite. S is an option whethe...

EEG data preprocessing in matlab and EEGLAB

It seems pretty clear what the differences are. F is using a different file format. Choose your favourite. S is an option whethe...

5일 전 | 1

답변 있음

Signal Processing EEG ECG

One method would be to use a moving RMS calculation over a small time window. You should know what a reasonable rms value is (ba...

Signal Processing EEG ECG

One method would be to use a moving RMS calculation over a small time window. You should know what a reasonable rms value is (ba...

5일 전 | 1

답변 있음

How to Plot(Time, Voltage) so that transient is captured for different inputs

One possible idea is to use a multiple of the time constant for the circuit. For a parallel RLC circuit this is 2RC, and for ser...

How to Plot(Time, Voltage) so that transient is captured for different inputs

One possible idea is to use a multiple of the time constant for the circuit. For a parallel RLC circuit this is 2RC, and for ser...

5일 전 | 1

| 수락됨

답변 있음

Smoothing a roughly sinusoidal signal

So are you saying you want to remove the frequency of the blue signal from the brown signal? Fairly easy, just use a notch/bands...

Smoothing a roughly sinusoidal signal

So are you saying you want to remove the frequency of the blue signal from the brown signal? Fairly easy, just use a notch/bands...

6일 전 | 0

답변 있음

Signal similarity analysis after cross correlation

Wouldn't it work just to set the threshold higher? It depends on what you mean by matching. If you want the exact same signal, ...

Signal similarity analysis after cross correlation

Wouldn't it work just to set the threshold higher? It depends on what you mean by matching. If you want the exact same signal, ...

6일 전 | 2

| 수락됨

답변 있음

calculate snr of digital signal

This is not correct. The second input to snr must be a real-valued row or column vector that must have the same dimensions as th...

calculate snr of digital signal

This is not correct. The second input to snr must be a real-valued row or column vector that must have the same dimensions as th...

6일 전 | 0

답변 있음

DTMF decoder .wav files code

It's a problem with your window size. Like I mentioned in a previous iteration of this question, you can look detect a proper wi...

DTMF decoder .wav files code

It's a problem with your window size. Like I mentioned in a previous iteration of this question, you can look detect a proper wi...

6일 전 | 1

답변 있음

How do I generate a given Matrix in one command?

T = toeplitz([1 -1 0 0 0 0],[1 8 0 0 0 0])+diag(0:5)

How do I generate a given Matrix in one command?

T = toeplitz([1 -1 0 0 0 0],[1 8 0 0 0 0])+diag(0:5)

7일 전 | 0