Condition of a matrix giving an error of first input must be single or double

31 次查看(过去 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

回答(1 个)

the cyclist
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 CenterFile Exchange 中查找有关 Eigenvalues 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by