math - Check existence of solution Matlab -
i have 2 functions return 2 arrays t1 , t2, want calculate h=t1/t2 , if there no solution {do something}. t1 vector , t2 jacobian matrix. (i need solve equation t2*d=t1) try
if isempty(t1\t2) {doing something} end
but isempty function returns 0. how can check exestence of solution t1\t2?
in command window matlab says
warning: system inconsistent. solution not exist.
update: try
d=inv(h)*phi
it works, difference , how can use command '\'?
you use rank judge if system not have unique solution:
if rank([t2,d]) ~= rank(t2) {doing something} end
Comments
Post a Comment