Eduardo Rocha
自 2016 起处于活动状态
Followers: 0 Following: 0
Feeds
提问
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...
8 years 前 | 2 个回答 | 0
2
个回答提问
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...
8 years 前 | 1 个回答 | 0
1
个回答提问
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 ...
8 years 前 | 0 个回答 | 0
0
个回答提问
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(...
8 years 前 | 2 个回答 | 0
2
个回答提问
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...
8 years 前 | 0 个回答 | 0
0
个回答提问
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...
8 years 前 | 1 个回答 | 0
1
个回答提问
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...
8 years 前 | 1 个回答 | 0
1
个回答提问
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...
8 years 前 | 0 个回答 | 0
0
个回答提问
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' ...
8 years 前 | 1 个回答 | 0
1
个回答提问
I have "NewCell" that's a cell with 1 row and 6 columns; in which column, there is another cell with 1 column and "k" rows. If the row "k" in NewCell (1,1) is 0, I want to know the average from values in another file (Preos2013S1)
sum=0; i=0; for k=0:size(Preos2013S1) if NewCell{1,1} == 0 sum=sum+Preos2013S1(k,6); i=i+1; ...
8 years 前 | 1 个回答 | 0
1
个回答提问
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...
8 years 前 | 1 个回答 | 0
1
个回答提问
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;...
8 years 前 | 2 个回答 | 0
2
个回答提问
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 ...
8 years 前 | 0 个回答 | 0
0
个回答提问
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 ...
8 years 前 | 1 个回答 | 0
1
个回答提问
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;...
8 years 前 | 1 个回答 | 0
1
个回答提问
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. ...
8 years 前 | 1 个回答 | 0