Condition of a matrix giving an error of first input must be single or double
36 次查看(过去 30 天)
显示 更早的评论
The matrix is as follows
1 -0.686522129973753 -0.551898879454274
1 -0.671205995069856 -0.519496574171434
1 -0.655431538907586 -0.486521559400613
The matrix is like this with 51 by 3 matrix and when I try to find condition number number I get the below error
[Error using svd
First input must be single or double.
Error in cond
s = svd(A);
Error in Script (line 24)
s = cond(s1,2)
Thank you
0 个评论
回答(1 个)
the cyclist
2018-2-22
Are you sure your input matrix is numeric (and not, for example, a cell array)? What do you get from
class(M)
where M is the matrix you are entering into cond? It needs to be a single or double, otherwise you will need to do some kind of type conversion.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!