photo

Eduardo Rocha


Actif depuis 2016

Followers: 0   Following: 0

Statistiques

  • Thankful Level 3

Afficher les badges

Feeds

Afficher par

Question


I have a matrix column with a number in each row, but they are not consecutive (per example, from 3 it jumps to 6). How can I turn them into a consecutive order?
I have a matrix column with a number in each row, but they are not consecutive (per example, from 3 it jumps to 6). How can I tu...

presque 8 ans il y a | 2 réponses | 0

2

réponses

Question


I want to save the data of the rows of U that are not empty. However, since this is inside a loop, I keep deleting the data from the previous loop. How can I keep saving the data without deleting the previous one?
if isempty(U)==0 u = U(any(U,2),:); U=[]; end On the first iteration, it works how it should, but on the second it...

presque 8 ans il y a | 1 réponse | 0

1

réponse

Question


I'm trying to create a classification system using artificial immune systems but I don't know how to create the loop properly.
So, I need to create a set of random detectors and then compare them with the real cases using "pdist2". When "pdist2" is under ...

presque 8 ans il y a | 1 réponse | 0

0

réponse

Question


I want to delete rows from a matrix but its giving me the error "Matrix index is out of range for deletion"
percentage_consumo= Preos2013S1(:,6)/maxconsumo; percentage_precos= Preos2013S1(:,21)/maxpreco; b = cellfun(@(x)str2double(...

environ 8 ans il y a | 2 réponses | 0

2

réponses

Question


I want to make a hierarchical system with some tests. However, I don't understand why my code does not work..
"teste1" is a cell array (1 column) with a number from 0 to 5 in each row. The code for this is this one: teste1 = cell(s...

environ 8 ans il y a | 1 réponse | 0

0

réponse

Question


I have a cell C that has "i" rows. Inside each row, there is another cell with "i" rows, but each row contains a number now. How can I make the total sum of all numbers that are in all cells of C?
elementos_cons1(all(cellfun(@isempty,elementos_cons1),2), : ) = []; B=cell(size(elementos_cons1)); C=cell(size(elementos_co...

environ 8 ans il y a | 1 réponse | 0

1

réponse

Question


I want to sum the subtraction of every element in a cell (1 column, "i" rows) with the others. Then, I want to sum all results
elementos_cons1(all(cellfun(@isempty,elementos_cons1),2), : ) = []; B=cell(size(elementos_cons1)); C=cell(size(elementos_co...

environ 8 ans il y a | 1 réponse | 0

1

réponse

Question


I have a cell teste1 that's 1 column and many rows. Each row has a number between 0 and 5. I want to create teste2 cell with the same size that only compares the rows with 0 with some conditions.
teste2 = teste1; for k=2:(length(Preos2013S1)-1) if teste2{k} == '0' mask = strcmp(ca...

environ 8 ans il y a | 1 réponse | 0

0

réponse

Question


I have a cell (NewCell {1,1}) with 1 column and many rows, each row has or '0' or []. If its '0', I want to make a comparison; if its the other thing, i want a 'V'.
teste2 = cell(size(catconsumo)); for k=2:(length(Preos2013S1)-1) if NewCell{1,1}{k} == '0' ...

environ 8 ans il y a | 1 réponse | 0

1

réponse

1

réponse

Question


I have "teste1" cell array column with values from 0 to 5. I want to separate the rows by number (0, 1, 2, 3, 4, 5) into the respective new cell array. How can I proceed?
A new cell with 0's, another one with 1's, and so on.. However, it would be even better if the rows would not change position...

environ 8 ans il y a | 1 réponse | 0

1

réponse

Question


I have a column cell array "teste1" and I want to create "teste2": if "teste1" is not 0, I want a 'V'; if "teste1" is 0, I want to compare 2 other different string cells and the result would be from 1 to 5 (or 0, if no condition was satisfied)
How can I proceed? I tried like this but "Undefined operator '~=' for input arguments of type 'cell'" : teste2 = teste1;...

environ 8 ans il y a | 2 réponses | 0

2

réponses

Question


I have a 6266x1 cell "teste1" and I want to create "teste2":
if "teste1" is not 0, I want a 'V'; if "teste1" is 0, I want to compare 2 other different string cells and the result would ...

environ 8 ans il y a | 1 réponse | 0

0

réponse

Question


How can I compare strings and create a new column with the comparison result?
I have "cat1" and "cat2" that are 2 columns with strings: If cat1 is low and cat2 is low, I want cat3 to be '1'; If cat1 is ...

environ 8 ans il y a | 1 réponse | 0

1

réponse

Question


I want to create a new column with words that are atributed regarding the numerical values of another column. How can I proceed?
I have a column with "consumption" and values range between 3000 and 8000. From 3000 to 4000, I want "low" in the new column;...

environ 8 ans il y a | 1 réponse | 0

1

réponse

Question


I imported data from a large excel file and now I want to delete the rows that have the values of column "dds" equal to 1 or 7. How can I proceed?
I imported data from a large excel file and now I want to delete the rows that have the values of column "dds" equal to 1 or 7. ...

environ 8 ans il y a | 1 réponse | 0

1

réponse