Why did the matrix symbol become 10x10?
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
fyza affandi
le 19 Nov 2018
Commenté : madhan ravi
le 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 commentaires
Réponse acceptée
madhan ravi
le 19 Nov 2018
Modifié(e) : madhan ravi
le 19 Nov 2018
symbol= zeros(length(mat)-1,length(mat),2); %changed this line
2 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!