Paolo Binetti
Followers: 0 Following: 0
Statistica
23 Domande
0 Risposte
RANK
17.862
of 294.507
REPUTAZIONE
2
CONTRIBUTI
23 Domande
0 Risposte
ACCETTAZIONE DELLE RISPOSTE
78.26%
VOTI RICEVUTI
2
RANK
of 151.819
CONTRIBUTI
0 Problemi
0 Soluzioni
PUNTEGGIO
0
NUMERO DI BADGE
0
CONTRIBUTI
0 Post
CONTRIBUTI
0 Pubblico Canali
VALUTAZIONE MEDIA
CONTRIBUTI
0 Punti principali
NUMERO MEDIO DI LIKE
Feeds
Domanda
Reading text file word by word
Input is the attached text file, with one long word, a newline, then several equal-length short words separated by white spaces....
quasi 6 anni fa | 2 risposte | 0
2
risposteDomanda
Inverse of sorting arrangement
[B,I] = sort(A) output is such that B = A(I). What would be the most efficient way to rather get B and J, such that A = B(J)?
circa 6 anni fa | 3 risposte | 1
3
risposteDomanda
fprintf is printing strange characters instead of numbers
I want to print a vector of unsigned integers to a text file, with a space between each number. But the file I get is just weird...
circa 6 anni fa | 1 risposta | 0
1
rispostaDomanda
How can you visualize graphs with string-labeled edges?
With the _biograph_ function you can generate a graph object, which you can then visualize with the _view_ function. But it seem...
oltre 6 anni fa | 0 risposte | 0
0
risposteDomanda
Faster alternative to containers.Map
Profiling a script (attached, along with a sample input data file), I have found that looking up a Map generated with containers...
circa 7 anni fa | 2 risposte | 0
2
risposteDomanda
Speeding up dynamic programming code
Is there a way to speed up this piece of code implementing a dynamic programming algorithm? % sample input v = repmat('C...
oltre 7 anni fa | 0 risposte | 0
0
risposteDomanda
Count common elements of two vectors, including repeats
I would like to count the common elements of two vectors a and b of integers, including repeats. For example, for: a = [9 1...
oltre 7 anni fa | 1 risposta | 0
1
rispostaDomanda
Generate neighbors of a string
I need to generate a cell array (or char array) containing all d-neighbors of a string of lenght k. This means all the k-long st...
oltre 7 anni fa | 1 risposta | 0
1
rispostaDomanda
Extract data from a non-rectangular text file, efficiently
In spite of going through Matlab help and several attempts, I still do not get how to use "textscan" or other relevant functions...
oltre 7 anni fa | 1 risposta | 0
1
rispostaDomanda
How to reshape two cell arrays of strings into a cell array of cell arrays
Is there a neat way to vectorize the for-loop below? n_nodes = 2^(20-1); nodes = cellstr(dec2bin(0:n_nodes-1))'; ...
oltre 7 anni fa | 2 risposte | 0
2
risposteDomanda
Reading and processing data from text file to matlab variable quickly
I use the following code to read data from a text file and process it into two cell arrays, and it works, but can it be done fas...
oltre 7 anni fa | 1 risposta | 0
1
rispostaDomanda
Vectorizing a structure assignment
Is vectorizing this for-loop possible and faster? nodes = cellstr(['GAA'; 'AACAG'; 'AAG'; 'AT'; 'ACA'; 'ACCGTTA';]); % samp...
oltre 7 anni fa | 1 risposta | 0
1
rispostaDomanda
Vectorizing multiple string comparison
Is there a way to significantly speed up this loop, perhaps by vectorizing it? Inputs in attachment. I do not have a Matlab vers...
oltre 7 anni fa | 2 risposte | 0
2
risposteDomanda
Generating a vector containing the sizes of all cells of a cell array, along a specific dimension
Is there a way to vectorize this? (I tried with "cellfun", but did not succeed). for i = 1:numel(a) s(i) = size(a{i}...
oltre 7 anni fa | 2 risposte | 0
2
risposteDomanda
How to read a text file into a char array
This is probably trivial, but I have not found an easy way to convert a text file of n lines and m columns (sample attached) int...
oltre 7 anni fa | 1 risposta | 0
1
rispostaDomanda
Improving efficiency of a char array function
I have built a function to be run 100000 times in a loop. Its input, "motifs", is a full 20x15 char array, containing only four ...
quasi 8 anni fa | 2 risposte | 0
2
risposteDomanda
How to efficiently generate a random integer within a range from an arbitrary probability distribution
I need to generate a random integer within a range from an arbitrary probability distribution, within a loop of 100000 iteration...
quasi 8 anni fa | 2 risposte | 0
2
risposteDomanda
How to efficiently generate a new array by indexing an array with another array
Is there a faster way to implement this loop, maybe vectorizing it? for j = 1:m C(:,j) = B(A(:,j,k),j); end wh...
quasi 8 anni fa | 1 risposta | 0
1
rispostaDomanda
How to vectorize strfind
Is it possible to use strfind in a vectorized way? Suppose I want to get find not just one pattern inside a string, but several ...
quasi 8 anni fa | 1 risposta | 0
1
rispostaDomanda
Converting a text file into strings and integers
I have .txt input files with a very simple structure, of which I attach an example. I want to convert its content in strings and...
quasi 8 anni fa | 1 risposta | 0
1
rispostaDomanda
Replacing characters with integers in a very long string
I have a string of a few millions characters, want to replace it with a vector of integers according to simple rules, such as 'C...
quasi 8 anni fa | 1 risposta | 0
1
rispostaDomanda
Given a very long string, replace chars with numbers and obtain cumulative sum vector
As input I have a vector of a few million char, which can be 'A', 'C', 'G', 'T'. The vector is called sequence. As output I w...
quasi 8 anni fa | 3 risposte | 0
3
risposteDomanda
How to vectorize a specific for-loop
I am trying to vectorize the for-loop hereafter. Would you have any hint? Thank you for i = 1 : numel(text)-k+1 % "text" i...
quasi 8 anni fa | 2 risposte | 1