Editing cell array values (each cell is a matrix)
Ältere Kommentare anzeigen
M=[];
M=dlmread('data.txt', '\t');
dataArray=M;
C= corrcoef(M(:,1:end));
imagesc(C);
cb = colorbar;
ylabel(cb, 'Correlation Coefficient');
moo=sqrt(C^.2)
moos=[]
for l=0:.1:1;
moo(moo<l)=0;
moos{end+1} = moo;
moos(moos>0)=1;
The last opertaion fails since > is an undefined operator for input arguments like cell. I unsuccessfully tried to make a function for the last line and implement it in cellfun. What would be the proper syntax here?
2 Kommentare
Ahsan Khan
am 11 Mai 2018
Bearbeitet: Ahsan Khan
am 11 Mai 2018
Akzeptierte Antwort
Weitere Antworten (1)
possibility
am 11 Mai 2018
before starting the iteration,
mos=[];
"before starting the removal of the next mo", most probably inside-end of the iteration,
mos{l*10}=mo;
1 Kommentar
Ahsan Khan
am 11 Mai 2018
Bearbeitet: Ahsan Khan
am 11 Mai 2018
Kategorien
Mehr zu Scripts finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!