답변 있음
Find the mean value and an array and then eliminate the value from an array which is greater than mean
Take a look at logical indexing. In pseudocode TF = A > xxx % logical vector A(TF) = [] % logical indexing B(TF) =...

대략 11년 전 | 1

답변 있음
Removing rows from all columns based on values of one column
Here is an example X = randi([1 10],10,3) % example data TF = X(:,3) > 5 % for which rows is column 3 larger than 5...

대략 11년 전 | 1

| 수락됨

답변 있음
How can i convert number to letter?
Take a look at cell arraysof strings. Use the number directly as indices into a cell array, or convert using some scheme (like 1...

대략 11년 전 | 0

답변 있음
Select every Nth row from number groups
a = [1 1 1 1 1 0 0 0 0 0 0 0 1 1 1 0 0 0 1 1 1 1] k = 1 ; while any(a) i0 = strfind([0 a],[0 1]) ; OUT{k} = i0...

대략 11년 전 | 0

답변 있음
how can i find more than one minimum points of the histogram??
You can sort the outcome of the histogram data = ceil(10*rand(100,1)) values = 1:10 count = histc(data,values) [...

대략 11년 전 | 0

답변 있음
How to load different data files in a for loop
for n=1:6, filename = sprintf('log_%d.mat',n) S = load(filename) % S is a structure with the variables inside ...

대략 11년 전 | 1

| 수락됨

제출됨


CATSTRUCT
Concatenate/merge structures (v4.1, feb 2015).

대략 11년 전 | 다운로드 수: 8 |

4.8 / 5

질문


File Exchange - Quickly see comments?
Maybe I am missing something, but how can I now quickly see if people have made new comments on my own files? The new look of th...

대략 11년 전 | 답변 수: 3 | 0

3

답변

답변 있음
How to sort each row of 120x200 array and keep track of column number ?
Use the second output of SORT: A = [7 8 2 1 ; 3 9 6 5 ; 5 2 1 9] [Asorted, OrigColIdx] = sort(A,2)

11년 초과 전 | 4

| 수락됨

답변 있음
How I make circular grid without using meshgrid or rectangle?
I think your approach is very straightforward. Everything I can think of right that does not generate grid points being thrown a...

11년 초과 전 | 0

답변 있음
1-D interpolation of histogram
help histc help interp1 With HISTC you can count the number of occurrences in a bins. Afterwards you can simply multiply...

11년 초과 전 | 0

답변 있음
finding and storing non zero elements in a NxN matrix
help find M = rand(5) < 0.2 ; % some data [r,c,v] = find(M) ; % row and column indices of non-zero elements (with va...

11년 초과 전 | 0

답변 있음
How to select multiple ranges of plot data to a cell array
Can you precisely formulate why you select those parts of the plot?

11년 초과 전 | 0

| 수락됨

답변 있음
how to do a conditionnal mean
Something along these lines should work (assuming FYEAR and DY are numerical arrays) FYEAR = [10 10 11 12 11 10 12 12 10] ...

11년 초과 전 | 0

답변 있음
How do I generate a sampled sequence with frequncy p(n)
See <http://www.mathworks.com/matlabcentral/fileexchange/8891-randp RANDP> on the file exchange X = [10 20 30] % observ...

11년 초과 전 | 0

답변 있음
Subscript indices must either be real positive integers or logicals.
Check the values of the indexing variables, for instance, using: disp(i) disp(refBlkVer) It will probably show that t...

11년 초과 전 | 0

답변 있음
Check if a function handle is valid
You might be interested in the function <http://www.mathworks.nl/matlabcentral/fileexchange/45778-isfunction/content/isfunction....

11년 초과 전 | 0

답변 있음
Create matrix using nested loops
Note that * Indexing in ML starts at 1 * You should rarely change the iterator inside the loop * sin and cos take radians, ...

11년 초과 전 | 0

답변 있음
How to acces a variable in structure when i only have the string saved into a variable
This would be an approach [filename, pathname] = uigetfile('*.mat', 'Select the MATLAB mat file'); tmp = load(filename);...

11년 초과 전 | 2

| 수락됨

답변 있음
What format is y in y=wavread('file')? Difficulty in finding peaks of a wav file as y is not a vector.
what does size(xn) returns? It might be N-by-2 for stereo wave files

11년 초과 전 | 0

답변 있음
strfind: how to set a cell for the pattern?
Then please explain the relationship between a,b,and c. Why is c{2} equal to 1?

11년 초과 전 | 0

답변 있음
strfind: how to set a cell for the pattern?
% implicit for with CELLFUN c = cellfun(@(x) strfind(x,b), a, 'un', 0)

11년 초과 전 | 0

답변 있음
Matrix creation which identify link of vehicles
M = accumarray(A(:,[2 3]), A(:,1), [81 81], @(x) {x})

11년 초과 전 | 1

답변 있음
Matrix which cells have multiple values
This can be done with a simple one-liner: M = accumarray(A(:,[2 3]), A(:,1), [81 81], @(x) {x}) M will be a 81-by-81 cel...

11년 초과 전 | 1

| 수락됨

답변 있음
Classification of a matrix to 0 and 1 matrix
A = [1,7,1 ; 2,2,1 ; 2,4,2 ; 3,13,2 ; 3,11,2 ; 4,6,2 ; 5,2,2 ; 5,2,2 ; 5,9,1 ; 6,7,1 ; 6,10,2 ; 7,8,1 ; 7,6,2 ; 7,6,2 ; 7,6,1 ...

11년 초과 전 | 2

답변 있음
Build huge matrix with vector components
n = 4 % a small example m = 3 [a, b] = ndgrid(1:n,1:m) pos = [0 0 ; b(:) a(:)]

11년 초과 전 | 1

| 수락됨

답변 있음
How do I smooth a plot ?
If you have the signal processing toolbox FILTFILT, otherwise FILTER x = [2 4 6 8 10 10 10 10 10 10 10 10 10 10 ] ; y ...

11년 초과 전 | 0

| 수락됨

답변 있음
How to define variable that itself contains one or more variables ?
You do not want to store things like Q1 = .. Q2 = .. .. Q98293 = .. in gazillion different, but related, variables You w...

11년 초과 전 | 0

답변 있음
For each non NaN value in the 2rd column, remove the entire row of Cell
Despite raw being a cell, are there only numbers in the second column? If so: tf = isnan(vertcat(raw{:,2})) ; raw2 = raw...

11년 초과 전 | 0

답변 있음
NaN selective removal from a matrix
tf1 = isnan(a) tf2 = all(a,2) tf3 = ~tf2 b = a(tf3,:) b2 = a(~all(isnan(a),2),:) % in one giant leap

11년 초과 전 | 0

| 수락됨

더 보기