What is this error about?
古いコメントを表示
Hi
I am trying to use an active contour and I get the error
Error using contour (line 46)
Input arguments for contour must be real. Use the function REAL to get the real part of the inputs.
Error in ruller (line 184)
hold on,[c,h] = contour(phi,[0 0],'r','linewidth',1); hold off
Can someone please explain me what this error is all about?
5 件のコメント
Guillaume
2019 年 1 月 31 日
The error message seems clear. Some elements of phi are complex. contour (nothing to do with active contour) only work on real inputs, not complex
KSSV
2019 年 1 月 31 日
[c,h] = contour(real(phi),[0 0],'r','linewidth',1);
Stelios Fanourakis
2019 年 1 月 31 日
Stelios Fanourakis
2019 年 1 月 31 日
Jan
2019 年 1 月 31 日
This is a strange code. Why do you convert the cell string us to a matrix at first and try to convert it into a number by str2num? What do you expect as number output for the char vector 'Iterations:'? I assume, that:
t = cell2mat(us);
e = str2num(t);
is orphaned and should be deleted.
What is J ? The rest of the code does not contain the failing call to contour, so what is the relation to the question?
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Active contours についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!