Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
How can I edit this code ?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Please I have this code
% code
ex = dlmread( 'BB.txt' ) ; %output data
S11 = dlmread( 'AA.txt' ) ; % input data
buffer = [S11,ex] ;
[~, ca] = unique( buffer, 'rows' ) ;
buffer = buffer(sort(ca),:) ;
Mshuffled = buffer(randperm(size(buffer,1)),:);
x1Range= 'B';
xlswrite( 'first.xlsx', [{'S11'}; num2cell( Mshuffled(:,1) )], 'X',x1Range) ;
xlswrite( 'first.xlsx', [{'E11'}; num2cell( Mshuffled(:,2) )], 'Y' ) ;
I need to multiply the data in (ex.txt) by 10^4 . So all rows in E11 column will be multiplied by this factor. Is that possible?
Many thanks
0 comentarios
Respuestas (1)
Image Analyst
el 30 de Nov. de 2015
Yes, but first you need to call dlmread('ex.txt') which you have not done yet. You've only read in AA.txt and BB.txt.
exData = dlmread( 'ex.txt'); % Input data
Next, I don't know what the "E11" column is. Columns have only letters, not letters and numbers. Do you mean the column that cell E11 is in, which, of course, is column "E" (column 5)? If so then:
% Multiply column 5 by 10^4
exData(:, 5) = exData(:, 5) * 10000;
0 comentarios
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!