Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

could anyone help me to solve the issue in the following code.

1 visualización (últimos 30 días)
jaah navi
jaah navi el 5 de Jun. de 2019
Cerrada: Rik el 5 de Jun. de 2019
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 comentarios
jaah navi
jaah navi el 5 de Jun. de 2019
I am trying but unable to get the result.Could you please help me to execute in such a way that AA and BB should not contain any zero values.
Rik
Rik el 5 de Jun. de 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.

Respuestas (0)

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by