How to get rid of the error

1 回表示 (過去 30 日間)
Prabha Kumaresan
Prabha Kumaresan 2018 年 1 月 3 日
コメント済み: ANKUR KUMAR 2018 年 1 月 3 日
N_UE=[10 20 30 40 50];
N_SC=[60 70 80 90 100];
for t= 1:length(N_UE)
for r = 1:length(N_SC)
G=rand(N_UE(t),N_SC(r));
V=1:50;
C=diag(V);
non_0=sum(C);
non_0=repmat(non_0,N_UE(t),1);
new_C=C;
new_C(non_0 & C ==0)= G(non_0 & C ==0);
end
end
If i run the code i am getting Error using & Matrix dimensions must agree.
Error in (line 11) new_C(non_0 & C ==0)= G(non_0 & C ==0);
could anyone tell me how to overcome the error
  6 件のコメント
KSSV
KSSV 2018 年 1 月 3 日
編集済み: KSSV 2018 年 1 月 3 日
ANKUR KUMAR exactly I feel the same....I told the same to this user. Don't ask multiple questions without clearing/ accepting the existing question. I can see four to five question asked by the user and people here breaking head to understand what is the question exactly. :(
ANKUR KUMAR
ANKUR KUMAR 2018 年 1 月 3 日
People are spending their precious time to solve your problem and we don't want anything in return except your acceptance. So, please first accept those answers which you think that resolves your problem.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by