フィルターのクリア

In an assignment A(:) = B, the number of elements in A and B must be the same.

1 回表示 (過去 30 日間)
hamed
hamed 2016 年 8 月 17 日
コメント済み: hamed 2016 年 8 月 17 日
Hello Dears
I have a 3D matrix H1:
[l,r,h3]=size(H1);
Which l,r,h3 are defined in another class and function. I have this line:
z1=bsxfun(@times,(maxc/r),ones(l,r,h3));
c is defined as:
c = 1000*ones(size(H1));
also z2 is created according to z1:
z2=zeros(l,r,h3);
The other variable is Cindex:
Cindex=(i-1)*path+j;
When I want to write the bellow code:
z2(Cindex)=maxc-1e-8;
I encounter to this error and also the error is due to the above line.I mean (z2(Cindex)=maxc-1e-8;)
In an assignment A(:) = B, the number of elements in A and B must be the same.
Bests
  1 件のコメント
hamed
hamed 2016 年 8 月 17 日
The maxc is the maximum size of c which is 1000 in my codes. Cindex is created by i and j which have already defined in a for loop.

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

採用された回答

Thorsten
Thorsten 2016 年 8 月 17 日
編集済み: Thorsten 2016 年 8 月 17 日
What is
size(max)
size(Cindex)
both must be the same.
  5 件のコメント
Thorsten
Thorsten 2016 年 8 月 17 日
Please be so kind to accept the answer if it was helpful.
hamed
hamed 2016 年 8 月 17 日
I'm so sorry Mr. Thorsten, I forgot to click on that. I appreciate again.
Cheers

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by