Community Profile

photo

Jos (10584)


1 362 total contributions since 2006

Professional Interests: neuroscience, physics, mathematics

Contact

Jos (10584)'s Badges

  • Thankful Level 2
  • Revival Level 1
  • 12 Month Streak
  • Guiding Light
  • Knowledgeable Level 4
  • First Answer
  • Scavenger Finisher
  • Speed Demon
  • Solver

View details...

Contributions in
View by

Answered
Center text on screen
% put a small x in the center of a new figure figure('menubar','none') ; ah = gca ; th = text(1,1,'X') ; set(ah,'visible','o...

2 jours ago | 0

| accepted

Answered
find row with certain value and put in cell
result = arrayfun(@(k) unique(B(A(:,k)==1,:)).', 1:size(A,2), 'un', 0)

2 jours ago | 0

| accepted

Answered
How can I equate all values of one vector to another and get the value ? Please find the example below
You can use logical indexing, a very powerful tool in Matlab tf = dataB == 7 dataA(tf)

2 jours ago | 0

Submitted


nones
fill each row/column with a certain number of ones (N-ONES)

2 jours ago | 0 downloads |

Thumbnail

Submitted


SLM
special linear matrix

2 jours ago | 1 download |

Thumbnail

Submitted


ranknum
compute the rank number (rankings) of elements

4 jours ago | 3 downloads |

Thumbnail

Answered
Ranking Numbers based on Size
Another, computationally simpler option: A = [1 5 0 9 6 4] [~, R] = sort(A) ; R(R) = 1:numel(A)

8 jours ago | 0

Answered
Ranking Numbers based on Size
A = [1 5 0 9 6 4] [~, ~, R] = unique(A)

8 jours ago | 0

| accepted

Answered
How can I subtract consecutive numbers from one starting point?
L = 1:4 SP = 200 R = SP - cumsum(L)

8 jours ago | 2

| accepted

Submitted


circulant
(yet another, but fast) Circulent Matrix

8 jours ago | 2 downloads |

Thumbnail

Submitted


getkey
Get a keypress

9 jours ago | 39 downloads |

Thumbnail

Submitted


getkeywait
Wait a certain time for a single keypress

9 jours ago | 20 downloads |

Thumbnail

Submitted


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

12 jours ago | 3 downloads |

Thumbnail

Answered
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...

12 jours ago | 2

Submitted


nchoose
all combinations of the elements of a set

12 jours ago | 2 downloads |

Thumbnail

Submitted


shake
Randomize a matrix along one dimension

13 jours ago | 1 download |

Thumbnail

Submitted


ShakespeareInsult
returns a Shakespearian insult

13 jours ago | 4 downloads |

Thumbnail

Answered
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...

13 jours ago | 0

Answered
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 ...

13 jours ago | 1

| accepted

Answered
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...

13 jours ago | 0

| accepted

Answered
Changing the Title of a plot in a nested loop
k = 3 ; str = sprintf('Run %d', k) title(str)

14 jours ago | 0

Answered
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...

16 jours ago | 0

| accepted

Answered
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...

16 jours ago | 0

Answered
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...

20 jours ago | 0

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

20 jours ago | 0

Answered
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 ...

21 jours ago | 0

Answered
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...

29 jours ago | 0

Submitted


insertrows
Insert rows into a matrix at specific locations

environ un mois ago | 23 downloads |

Thumbnail

Submitted


countmember
Count members.

environ un mois ago | 18 downloads |

Thumbnail

Submitted


permn
Permutations with repetition, all or a subset

environ un mois ago | 121 downloads |

Thumbnail

Load more