Undefined function 'abs' for input arguments of type 'cell'.
14 ビュー (過去 30 日間)
古いコメントを表示
Daniel McCully
2019 年 11 月 18 日
コメント済み: Daniel McCully
2019 年 11 月 20 日
function c = test(A)
r=abs(A(2,2));
disp(r);
end
I'm trying to take the absolute value of a specific cell but i get this error.
Undefined function 'abs' for input arguments of type 'cell'.
Error in test (line 2)
r=abs(A(2,2));
What is going on that I can't see?
A is also a matrix with dimensions of at least 2x2.
0 件のコメント
採用された回答
Erivelton Gualter
2019 年 11 月 18 日
It is saying A is a cell type. In order to check it, run the following code:
class(A)
If this is the case, the following should work:
function c = test(A)
r=abs([A{2,2}]);
disp(r);
end
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Digital Filtering についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!