필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

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

조회 수: 1 (최근 30일)
jaah navi
jaah navi 2019년 6월 5일
마감: Rik 2019년 6월 5일
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
jaah navi
jaah navi 2019년 6월 5일
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 2019년 6월 5일
@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.

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by