biterr Error on 3D Matrix

1 回表示 (過去 30 日間)
Paul Hoffrichter
Paul Hoffrichter 2020 年 11 月 24 日
回答済み: Paul Hoffrichter 2020 年 11 月 27 日
B = [1 2 3; 4 5 6; 7 8 9];
size(B) % ans = 3 3
biterr(B,B) % ans = 0
Why does biterr work here, but not below?
A = B;
A(:,:,2) = [10 11 12; 13 14 15; 16 17 18];
size(A) % ans = 3 3 2
biterr(A,A)
Operands to the || and && operators must be convertible to logical scalar values.
Error in biterr (line 212)
if aIsNumeric && (num_bits > 1)
212 if aIsNumeric && (num_bits > 1)

採用された回答

Rashed Mohammed
Rashed Mohammed 2020 年 11 月 27 日
Hi Paul
As mentioned in the biterr documentation, the inputs must be either a vector or a matrix with mxn dimensions. 3D matrices are not supported as of now. I have brought this issue to the concerned people and it might be considered in any future release.
Hope this helps

その他の回答 (1 件)

Paul Hoffrichter
Paul Hoffrichter 2020 年 11 月 27 日
Maybe I am not looking hard enough.
>> the inputs must be either a vector or a matrix with mxn dimensions
Only thing I saw in the documentation is " if the matrix has dimensions m-by-n," and that was for the special cases where one of the inputs is a matrix and the other input is a row or col vector.

カテゴリ

Help Center および File ExchangeSoftware Development Tools についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by