Replication factors must be a row vector of integers or integer scalars.

9 ビュー (過去 30 日間)
Asghar Ali
Asghar Ali 2017 年 3 月 3 日
コメント済み: Walter Roberson 2017 年 3 月 3 日
Replication factors must be a row vector of integers or integer scalars.
meanX = repmat(double(meanX), [nFilters/16, 1]);
Can anyone help me?

採用された回答

Walter Roberson
Walter Roberson 2017 年 3 月 3 日
If nFilters was not an integer divisible by 16, then nFilters/16 would not be a positive integer. The number of repetitions you specify must be positive integers. For example,
meanX = repmat(double(meanX), [ceil(nFilters/16), 1]);
would be more likely to be a positive integer (but would still fail if nFilters was 0 or negative.)
  3 件のコメント
Asghar Ali
Asghar Ali 2017 年 3 月 3 日
Thanks Walter, it works fine, but I get following error now: Non-singleton dimensions of the two input arrays must match each other.
rawValues = bsxfun(@minus, (filtX-bsxfun(@times, meanX, filtMean)) ./ stdX, whitening);
Walter Roberson
Walter Roberson 2017 年 3 月 3 日
I suspect that your code relies upon the number of filters being a multiple of 16, such as would be the case if you had 176 filters instead of 175.

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

その他の回答 (1 件)

David J. Mack
David J. Mack 2017 年 3 月 3 日
nFilters/16 is probably not an integer. Depending on your needs, try round(nFilters/16) instead or use a number of filters which is an integer multiple of 16.
Greetings, David

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by