Why did the matrix symbol become 10x10?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
fyza affandi
il 19 Nov 2018
Commentato: madhan ravi
il 19 Nov 2018
>> format long
mat = [ 0.7188 0.0625 0.0625 0.0469 0.0313 0.0156 0.0156 0.0156 0.0156 0.0156 ];
index = find(ismember(mat,min(mat)));
b = index(end-1:end);
symbol= zeros(length(mat),(length(mat)-1),2);
for b1 = 1:length(b)
symbol((length(mat)-1),b(b1),2)=1;
end
The result is
symbol(:,:,2) =
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 1
0 0 0 0 0 0 0 0 0 0
I have declare 9 x 10 matrix but the above matrix shows 10x10
0 Commenti
Risposta accettata
madhan ravi
il 19 Nov 2018
Modificato: madhan ravi
il 19 Nov 2018
symbol= zeros(length(mat)-1,length(mat),2); %changed this line
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!