Community Profile

photo

Daniel M


234 2018 年以降の合計貢献数

Daniel M's バッジ

  • Thankful Level 1
  • Pro
  • Revival Level 2
  • Knowledgeable Level 3
  • First Answer
  • Solver

詳細を表示...

貢献した分野
表示方法

回答済み
i cannot find the minimum values for matrix.
You must have overwritten 'min' as a variable, and doing min(T) is trying to index into a variable at non-integer positions. Tha...

約8時間 前 | 2

回答済み
Accessing field data in nonscalar structure array
Here is a solution. You'll have to write the functions differently for gathering cells and arrays. fun = @(s,field) {s.(field)}...

約15時間 前 | 1

| 採用済み

回答済み
Taking means of initial values in individual cells of structure
tracks.A = [{1:6};{10:14}]; Int2 = cellfun(@(x) mean(x(1:3)), tracks.A); % ans = [2; 11]; If instead you have a n...

1日 前 | 1

| 採用済み

回答済み
how to speed my code up
Why do you need a loop to compute a sum? Just replace the entire function with utilization = sum(myArray(periodNumber, 1:co...

3日 前 | 1

| 採用済み

回答済み
Matrix dimensions must agree Error
A is [8x8] and B is [8x1]. Do you mean to do the |mrdivide| operation, "/"? Or do you mean to do element-wise division "./"? If ...

3日 前 | 0

回答済み
When loading .mat files in a parfor, the first time is way slower than the second time.
So you're doing something like this? for k = 1:10 mydata = load('myfile.mat'); output = someFunction(mydata); end T...

4日 前 | 0

回答済み
How do I remove the brackets from the numeric values around the zeros, so that only the numeric values are left and I am able to use boolean logic to get a solution ( 1 or 0)?
Hmm, seems like this was an opportunity to apply what you learned yesterday regarding regexprep, if you're trying to remove/repl...

5日 前 | 1

| 採用済み

回答済み
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...

6日 前 | 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...

6日 前 | 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...

6日 前 | 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...

6日 前 | 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 ...

7日 前 | 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...

7日 前 | 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 ...

7日 前 | 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);

7日 前 | 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...

7日 前 | 2

| 採用済み

回答済み
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...

7日 前 | 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...

7日 前 | 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'); ...

8日 前 | 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...

8日 前 | 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); ...

8日 前 | 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...

8日 前 | 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...

8日 前 | 1

| 採用済み

回答済み
How can I remove the default transparency of graph edges?
set(P,'EdgeAlpha',1);

8日 前 | 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 ...

8日 前 | 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...

10日 前 | 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...

10日 前 | 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...

10日 前 | 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...

10日 前 | 1

Load more