A soumis


getkeywait
Wait a certain time for a single keypress

presque 7 ans il y a | 5 téléchargements |

4.9 / 5
Thumbnail

A soumis


runindex
linear indices for each run in a vector (run length encoding, and decoding)

environ 7 ans il y a | 1 téléchargement |

5.0 / 5
Thumbnail

Réponse apportée
To find Maximum value and minimum value for each group of four rows for a 1576*1024 matrix
Here is an accumarray trick H1 = randi(100,10,2) % sample data Nrows = 4 ; R = floor((0:size(H1,1)-1)/Nrows) + 1 ; R = repm...

environ 7 ans il y a | 2

A soumis


nchoose
all combinations of the elements of a set

environ 7 ans il y a | 1 téléchargement |

5.0 / 5
Thumbnail

A soumis


shake
Randomize a matrix along one dimension

environ 7 ans il y a | 1 téléchargement |

4.4 / 5
Thumbnail

A soumis


ShakespeareInsult
returns a Shakespearian insult

environ 7 ans il y a | 1 téléchargement |

5.0 / 5
Thumbnail

Réponse apportée
How to format the length of a line of text using fprintf in a loop
Why don't you format the values within each string to be nicely aligned, before sending them to a text file? A = rand(4,3) ; f...

environ 7 ans il y a | 0

Réponse apportée
Best way to loop through multiple subfolders and run either script A or B depending on folder name?
If you have adopted a logical naming system for the files and directories, something simple like this would do: for P = 1:24 ...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
select one element in each row but not the same column
A= [1 2 3; 4 5 6; 7 8 9] ix = logical(eye(size(A))) % one element per row ix = ix(:,randperm(size(ix,2))) % randomize accross...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
Changing the Title of a plot in a nested loop
k = 3 ; str = sprintf('Run %d', k) title(str)

environ 7 ans il y a | 0

| A accepté

Réponse apportée
I would like to get an example of the difference between the maximum and minimum values by grouping grpstats or looping statements
Let M be your N-by-3 table, with columns [id1 id2 value] : [out, ~, gi] = unique(M(:,[1 2]), 'rows') out(:,3) = grpstats(M(:,3...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
How to create a folder and save pictures
help mkdir help saveas p = 1 foldername = sprintf('Folder%02',p) mkdir(foldername) picturename = fullfile(foldername, 'm...

environ 7 ans il y a | 0

Réponse apportée
how do i take the data from cells in a cell array and turn them into a data array
This is the accumarray solution that Stephen hinted to: T1 = [99 10 11 ; 99 20 21 ; 30 31 32] [~,~,ib] = unique(T1(:,1), 'stab...

environ 7 ans il y a | 0

Réponse apportée
How to add string and number to a graph?
str = 'hello' gtext(str) % put the text interactively using your mouse

environ 7 ans il y a | 0

| A accepté

Réponse apportée
matrix with all possible combinations of 8!
You need permutations not combinations (which my function allcomb returns). Take a look at PERMS >> perms(1:3) 3 2 ...

environ 7 ans il y a | 0

Réponse apportée
How do I print results of ANOVA to a title?
You have to create a string (character array) from the results of the ANOVA. Something like this [p,TB] = anova1(...) str = sp...

environ 7 ans il y a | 0

A soumis


insertrows
Insert rows into a matrix at specific locations

environ 7 ans il y a | 2 téléchargements |

5.0 / 5
Thumbnail

A soumis


countmember
Count members.

environ 7 ans il y a | 3 téléchargements |

4.8 / 5
Thumbnail

A soumis


permn
Permutations with repetition, all or a subset

environ 7 ans il y a | 11 téléchargements |

4.9 / 5
Thumbnail

Réponse apportée
How to use if statements with arrays?
You need to assign the i-th calculation the i-th element in y in the two conditions y(i) = ... To speed things up, especially ...

environ 7 ans il y a | 2

Réponse apportée
Extract submatrix using a sliding window
My advise: create the proper index vector from windowsize and shift and use that to extract the rows A = [1 2 3; 4 5 6 ; 7 8 9 ...

environ 7 ans il y a | 0

Réponse apportée
How to extract element of all matrices within a cell array using cellfun?
This looks like homework to me. Here is a big hint: Create a function that extracts this for you and use cellfun to apply it to...

environ 7 ans il y a | 1

A soumis


PADCAT
concatenate vectors with different lengths by padding with NaN

environ 7 ans il y a | 9 téléchargements |

4.9 / 5
Thumbnail

Réponse apportée
How to calculate mean of multiple arrays
If I read your question to the letter, you have 12263 recordings of pupil sizes. Each recording lasted 784 ms. Recoring frequenc...

environ 7 ans il y a | 1

| A accepté

Réponse apportée
leaving one out help
% One of the many ways ... N = 10 ; for k = 1:N s = [1:k-1 k+1:N] % your code using s end

environ 7 ans il y a | 0

| A accepté

Réponse apportée
Compares permutation in the matrix in another matrix.
tf = ismember(matrix_MbyN, vector_1byN, 'rows') rows_in_M = find(tf)

environ 7 ans il y a | 0

Réponse apportée
Setting static text to equal a variable
a = 100 ; StaticText = sprintf('Health = %d', a)

environ 7 ans il y a | 0

| A accepté

Réponse apportée
How to choose image
Do not store them in two separate variables, but use a cell or struct array! It is the contents of variable that should vary, n...

environ 7 ans il y a | 0

| A accepté

Réponse apportée
How to get row index based on two columns
tf1 = strcmp(YourCellArray(:,2), 'Continuous') tf2 = cat(1, YourCellArray{:,3}) <= 80 DesiredRows = find(tf1 & tf2)

environ 7 ans il y a | 1

Réponse apportée
How to change a value in an array when a condition is met?
Something like this? idx = Velocity(:,3) == 0 % where to change N = sum(idx) % how many to change p = [-1 1] ...

environ 7 ans il y a | 0

Charger plus