統計
All
Feeds
回答済み
how is imwrite() in Matlab2020a saving RGB?
You are saving as a jpeg file, which is lossy by default. If you save as .png for example (lossless), there will be no differen...
how is imwrite() in Matlab2020a saving RGB?
You are saving as a jpeg file, which is lossy by default. If you save as .png for example (lossless), there will be no differen...
5年以上 前 | 0
| 採用済み
回答済み
Can't call function within class
You forgot to bracket the output args, and the semi-column is useless: function [resamp_x,resamp_y] = resamp_sig(obj)
Can't call function within class
You forgot to bracket the output args, and the semi-column is useless: function [resamp_x,resamp_y] = resamp_sig(obj)
5年以上 前 | 0
| 採用済み
回答済み
Matlab: Select a variable name and find the corresponding value
Here is one way: content = fileread( 'myTextFile.txt' ) ; match = regexp( content, '(?<=\$_Wk1_lr_m,\s+str\s*=\s*''\s*)[^\s'...
Matlab: Select a variable name and find the corresponding value
Here is one way: content = fileread( 'myTextFile.txt' ) ; match = regexp( content, '(?<=\$_Wk1_lr_m,\s+str\s*=\s*''\s*)[^\s'...
5年以上 前 | 0
| 採用済み
回答済み
video in a figure
The reason is indicated in the doc: "The movie function uses a default figure size of 560-by-420 and does not resize figures to ...
video in a figure
The reason is indicated in the doc: "The movie function uses a default figure size of 560-by-420 and does not resize figures to ...
6年弱 前 | 0
回答済み
I have been getting error 377 for weeks now. How do I fix this issue?
You could follow the instructions for manual activation provided in the thread referenced in this answer.
I have been getting error 377 for weeks now. How do I fix this issue?
You could follow the instructions for manual activation provided in the thread referenced in this answer.
6年弱 前 | 0
回答済み
extract data from EEG text file
Using the data text file that you provided elsewhere (renamed and attached to this answer), here is a short example of one way t...
extract data from EEG text file
Using the data text file that you provided elsewhere (renamed and attached to this answer), here is a short example of one way t...
6年以上 前 | 1
| 採用済み
回答済み
How to sum repeated adjacent values in a vector
Here is one way: Y = splitapply( @sum, X, [0, cumsum( diff(X) ~= 0 )] + 1 ) ; or, split into two expressions that make it easi...
How to sum repeated adjacent values in a vector
Here is one way: Y = splitapply( @sum, X, [0, cumsum( diff(X) ~= 0 )] + 1 ) ; or, split into two expressions that make it easi...
6年以上 前 | 2
回答済み
Comparing Data sets with same numbers of Array
As you have no N-NE direction, here is an example for SE-S: dayId = [1, 5, 10, 15, 50, 60, 92] ; cat_sub = cat_wind_direct...
Comparing Data sets with same numbers of Array
As you have no N-NE direction, here is an example for SE-S: dayId = [1, 5, 10, 15, 50, 60, 92] ; cat_sub = cat_wind_direct...
6年以上 前 | 0
| 採用済み
回答済み
How do I extract points from multiple circles?
We cannot test without your data, but the approach seems fine. You could use the PDIST2 function and extract everything in one s...
How do I extract points from multiple circles?
We cannot test without your data, but the approach seems fine. You could use the PDIST2 function and extract everything in one s...
6年以上 前 | 1
| 採用済み
回答済み
python with matlab, undefined variable py?
Try going through: https://www.mathworks.com/help/matlab/matlab_external/undefined-variable-py-or-function-py-command.html and ...
python with matlab, undefined variable py?
Try going through: https://www.mathworks.com/help/matlab/matlab_external/undefined-variable-py-or-function-py-command.html and ...
7年弱 前 | 0
回答済み
How to slice each string in a string array without using for loop
If you favor performance over readability/maintainability, you can build an approach around the following: buffer = vertcat(...
How to slice each string in a string array without using for loop
If you favor performance over readability/maintainability, you can build an approach around the following: buffer = vertcat(...
7年以上 前 | 4
| 採用済み
回答済み
How to retrieve z value from surf plot given x and y?
Interpolate with |INTERP2| : <https://www.mathworks.com/help/matlab/ref/interp2.html> where |Xq| and |Yq| are defined using t...
How to retrieve z value from surf plot given x and y?
Interpolate with |INTERP2| : <https://www.mathworks.com/help/matlab/ref/interp2.html> where |Xq| and |Yq| are defined using t...
7年以上 前 | 0
| 採用済み
回答済み
Writing a loop to calculate a seasonal cycle and then plot the seasonal cycle?
Where is |t| defined? In addition, |month_mean| is your intermediary variable; you want to plot either |seasonal_cycle| or |s_cy...
Writing a loop to calculate a seasonal cycle and then plot the seasonal cycle?
Where is |t| defined? In addition, |month_mean| is your intermediary variable; you want to plot either |seasonal_cycle| or |s_cy...
8年弱 前 | 0
回答済み
How to read large text data into matlab
If you have enough RAM for this, the following could run a little faster. It is way less versatile than Per's solution though, a...
How to read large text data into matlab
If you have enough RAM for this, the following could run a little faster. It is way less versatile than Per's solution though, a...
8年弱 前 | 1
| 採用済み
回答済み
How can I create a matrix with the values of the elements is a function of the indices?
Not sure that I understand. If you wanted to create a rectangular array whose elements are a the result of some arithmetic opera...
How can I create a matrix with the values of the elements is a function of the indices?
Not sure that I understand. If you wanted to create a rectangular array whose elements are a the result of some arithmetic opera...
8年弱 前 | 0
| 採用済み
回答済み
Strfind to contain complex pattern
Here is an approach: str = 'John played volleyball. I love Anna. Are you there?' ; buffer = strtrim( strsplit( str, {'....
Strfind to contain complex pattern
Here is an approach: str = 'John played volleyball. I love Anna. Are you there?' ; buffer = strtrim( strsplit( str, {'....
8年弱 前 | 0
| 採用済み
回答済み
Rearrange cell content by groups
Hi |dpb|, Assuming that you have a cell array (and that you are using this _table type of output_ just for a _display purpose...
Rearrange cell content by groups
Hi |dpb|, Assuming that you have a cell array (and that you are using this _table type of output_ just for a _display purpose...
8年弱 前 | 0
質問
Solving A{k} * x + b = 0 for large numbers of A{k} with same structure/filling.
Dear all, I am trying to improve the efficiency of solving |A{k}*x+b=0| for |x|, that I currently solve using the...
8年弱 前 | 2 件の回答 | 0
2
回答質問
Should I (and how to) avoid "forests" of listeners in nested OOP structure.
Dear all, I never used more than the basics of events and listeners, and I could benefit from the input of ...
約8年 前 | 0 件の回答 | 0
0
回答質問
Dynamic superclass name in call to superclass method.
Dear all, In a particular context, I could benefit from being able to use _"dynamic superclass naming"_ in calls...
約8年 前 | 0 件の回答 | 2
0
回答質問
Error management in OOP framework.
Dear all, I am trying to implement an error management mechanism that allows building very detailed error r...
約8年 前 | 1 件の回答 | 1
1
回答回答済み
How to vertcat 100 matrices ?
If they are stored in cell array |M|: Mvcat = vertcat( M{:} ) ; where |M{:}| is what we call a _comma separated list_ (CS...
How to vertcat 100 matrices ?
If they are stored in cell array |M|: Mvcat = vertcat( M{:} ) ; where |M{:}| is what we call a _comma separated list_ (CS...
約8年 前 | 1
| 採用済み
回答済み
print leading and trailing zeros into text file
>> dec2hex(195112160, 8) ans = '0BA12CE0'
print leading and trailing zeros into text file
>> dec2hex(195112160, 8) ans = '0BA12CE0'
約8年 前 | 0
| 採用済み
回答済み
Finding and saving identical rows in a matrix
Alternatively: [~, ~, ic] = unique( A(:,1:2), 'rows' ) ; groups = splitapply( @(x){x}, A, ic ) ; produces groups = ...
Finding and saving identical rows in a matrix
Alternatively: [~, ~, ic] = unique( A(:,1:2), 'rows' ) ; groups = splitapply( @(x){x}, A, ic ) ; produces groups = ...
約8年 前 | 1
| 採用済み
回答済み
How extract sub matrix without zeros from a big matrix
Here is an example; we first build a test data set: >> N = randi( 10, 10, 4 ) ; >> for k = 1 : 10, N(k,1+randi(3,1):end) =...
How extract sub matrix without zeros from a big matrix
Here is an example; we first build a test data set: >> N = randi( 10, 10, 4 ) ; >> for k = 1 : 10, N(k,1+randi(3,1):end) =...
約8年 前 | 2
| 採用済み
回答済み
How to remove repeating elments from a matrix?
Almost, the idea was correct but you were not working on the correct dimension. Also, sorting the input array vertically makes c...
How to remove repeating elments from a matrix?
Almost, the idea was correct but you were not working on the correct dimension. Also, sorting the input array vertically makes c...
約8年 前 | 0
| 採用済み
回答済み
sum of matrix omitting one dimension
Here is one way, but there is probably a simpler approach: buffer = arrayfun(@(k) permute(KL, circshift(1:ndims(KL), k-1)), ...
sum of matrix omitting one dimension
Here is one way, but there is probably a simpler approach: buffer = arrayfun(@(k) permute(KL, circshift(1:ndims(KL), k-1)), ...
約8年 前 | 0
回答済み
Split array into cell arrays of different size
>> seqs = mat2cell( A, 1, diff( [strfind(A, [5,19]), numel(A)+1] )) seqs = 1×5 cell array {1×4 double} {1×3 doub...
Split array into cell arrays of different size
>> seqs = mat2cell( A, 1, diff( [strfind(A, [5,19]), numel(A)+1] )) seqs = 1×5 cell array {1×4 double} {1×3 doub...
約8年 前 | 0
回答済み
Find if two sparse matrix have 1 in same position
Do you need something along this line? % - Build small test case. A = sprand( 4, 5, 0.5 ) > 0 ; % 4x5 sparse. B =...
Find if two sparse matrix have 1 in same position
Do you need something along this line? % - Build small test case. A = sprand( 4, 5, 0.5 ) > 0 ; % 4x5 sparse. B =...
約8年 前 | 0
| 採用済み
回答済み
How to import Text File with 2 different Delimiters (how to organize header data and numeric data)
You may not need to use header information for parsing your file. Look at this example (applied to |data.txt| attached): ...
How to import Text File with 2 different Delimiters (how to organize header data and numeric data)
You may not need to use header information for parsing your file. Look at this example (applied to |data.txt| attached): ...
約8年 前 | 0










