Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
could anyone help me to solve the issue in the following code.
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
When i run the code it executes and gives me the result.But what i actually need is AA and BB should not contain any zeros.
Could anyone please help me on it.
a=[3.6910 4.5873 4.4183 4.3806 0;
0 7.2707 5.9523 7.2934 3.7516;
6.0274 0 0 0 6.7603]
siz = size(a)
result1=randi(3,1,5)
idx1 = sub2ind(siz, result1, 1:siz(2))
C1 = zeros(siz)
C1(idx1) = a(idx1)
AA=sum(C1,2)
BB=sum(C1,1)
3 commentaires
Rik
le 5 Juin 2019
@Jaah: please try to limit yourself to at most 1 question per day. This is really tiring for us volunteers. The way you're doing this is reducing the effort people are willing to put into helping you.
YOU SHOULD REALLY CONSIDER TAKING AN EXTENSIVE COURSE IN HOW TO USE MATLAB. Preferably with an instructor that speaks your native language.
@Darova, although I really feel your annoyance (and mostly agree with it), both Jaah and his colleague/classmate Prabha have difficulty with how to use this website. Their mastery of the English language also makes this more difficult. I think blocking this user may be too harsh, although at some point they will just end up on everyones mute-list. I know for a fact some of us were ignoring them both when they averaged at least 5 duplicate question between the two of them.
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!