Community Profile

photo

German Preciat Gonzalez


Université de Luxembourg

21 total contributions since 2016

Contact

German Preciat Gonzalez's Badges

  • Thankful Level 2

View details...

Contributions in
View by

Question


How to select the indices of two arrays that satisfy two conditions using cellfun (no loops or ifs)?
Let's say I have two arrays: A = {'one(1)', 'two(1)', 'three(2)', 'four(2)', 'five(1)'}; B = {'One', 'TWo', 'thrEE', 'Four...

1 year ago | 1 answer | 0

1

answer

Question


how to add and sort a cell with a string in a cell array in order to replace or add a cell with respect the last word of the cell?
I did this using a lot of lines and I was wondering if you could recommend me a better way to do it. I have a predefined ce...

1 year ago | 1 answer | 0

1

answer

Question


How to add information in a figure already created
Imagine that I have a function like this function somethingPlotted = plotSomething(x, y) somethingPlotted = plot(x,y)...

2 years ago | 1 answer | 0

1

answer

Question


if is possible to cancel a process if matlab take too much time to perfom the process?
I have a for loop to analyse data, for i=:length(data) task(data(i)); end but for example, if data has a length o...

2 years ago | 2 answers | 0

2

answers

Question


How to obtain the indexes of numbers in a cell array with mixed data?
I have different cell arrays like: cellArray1={'PGD',[23095],[5226],[NaN],[NaN]}; cellArray2={[12342],[NaN],[NaN],[NaN],[N...

2 years ago | 1 answer | 0

1

answer

Question


How to obtain a numeric vector with the position of elements of an array regarding another array?
I have many pairs of arrays (one is the reference and other a with the same elements but with different position) and I need a n...

2 years ago | 2 answers | 0

2

answers

Question


How to substitute numbers in a string with repeated strings?
I have many different strings with different numbers with this format: str='A + 2 B -> D + 3 E'; I would like to replace...

2 years ago | 3 answers | 0

3

answers

Question


How to use cellfun in only cells with numbers or how to create a csv file with different elements (numbers and strings)?
I have a big cell array (22002x12) with multiple elements (strings and numbers) and I want to convert them to a CSV file but obv...

2 years ago | 3 answers | 0

3

answers

Question


It is posible to write a script with many functions and call these functions?
I have to write a very large script with a lot of functions within the script. Instead of having functions as a separated files ...

2 years ago | 1 answer | 0

1

answer

Question


how to reduce the information contained in each field in a struct array?
I have a very big struct array which can be summarized in something like this: A = [0 0 0 0 0 0; ...

2 years ago | 1 answer | 0

1

answer

Question


How to add text in a bar in a multiple bar plot?
Hi all, I have a matrix M like this: M = [99.0000 93.0000 65.0000 95.0000 97.0000 97.0000; 84.0000 95.0...

2 years ago | 2 answers | 0

2

answers

Question


How to solve an equation of the form A (matrix) x(vector) = b(vector) and a constant c where I have to find x and c, and x is only positive?
Hi, I have a matrix A A =[1 1 2 2 0 0; 1 1 2 2 0 0; 0 0 0 1 0 0; 0 0 0 1 0 0; 3 0 0 0 0 0; ...

3 years ago | 2 answers | 0

2

answers

Question


How to add new lines after some specific characters for a big string (1M)?
Hi, I have a string of ~1M characters, I need to add new lines after some strings BUT under certain conditions so for exam...

3 years ago | 1 answer | 0

1

answer

Question


how calculate percentage with a vector and a matrix with nan elements?
I have a vector V where each element of V is bigger than zero, and a matrix M where each row represent data, each column the so...

3 years ago | 1 answer | 0

1

answer

Question


How to create comparison matrices "comparing" arrays from an struct array with 4 columns and N rows?
I have data from 4 different sources in a form of arrays inside a struct array. I want to compare which arrays are the same and ...

3 years ago | 2 answers | 0

2

answers

Question


How to create comparison matrices "comparing" strings from 6 different data sources?
I have data from 4 different sources in a form of strings. I want to compare which strings are the same and if they are not equa...

3 years ago | 1 answer | 0

1

answer

Question


How to create a matrix with the data of a comparison, upper triangular the percentage of similarity and lower triangular the times that were compared?
I have a matrix with N rows and 4 columns. Each row represent a comparison of a file between different sources, columns repres...

3 years ago | 1 answer | 0

1

answer

Question


how to extract the names of all the files with an specific extension content in different directories and omit the name if is repeated?
If I want all the name of the files with an extension .jpg in different directories so far I use this: dir1='~/dir1' dir...

3 years ago | 1 answer | 0

1

answer

Question


How to compare multiple strings and assign values to the comparison?
I have data from 6 different sources in a form of strings. I want to compare which strings are the same. So if I have: d...

3 years ago | 4 answers | 0

4

answers

Question


How to find dependent column vectors of a matrix for a given column vector?
For example if I have a matrix m where: m=[1 2 3 4; ... 1 5 3 6; ... 1 7 3 8]; if I put as an input column 1...

3 years ago | 2 answers | 0

2

answers

Question


how can I generate different vectors with the all the unique combinations of numbers inside a one vector?
Hi, If i have a vector a like: a=[1 2 3 4]: how can I generate different vectors with the all the unique combinations...

3 years ago | 1 answer | 0

1

answer