Curl function outputting -inf and NaN
古いコメントを表示
Hello All,
I have a 2-D velocity field I am trying to calculate the curl of. My input
curlX=curl(Y,Z,V,W);
and it gives me a matrix of a bunch of -inf, inf and NaN.
if I input just curlX=curl(V,W) then it gives me a result for curl but not on the correct coordinate system. Can someone please help me with this?
-Spencer
1 件のコメント
Robert
2023 年 11 月 16 日
Try curlX=curl(Y.',Z.',V.',W.');
採用された回答
その他の回答 (3 件)
Sean de Wolski
2011 年 6 月 8 日
0 投票
Apparently you're dividing a positive number by zero (inf), a negative number by zero (-inf) and zero by zero (nan). What does your data look like?
Spencer
2011 年 6 月 8 日
0 投票
1 件のコメント
Andrew Newell
2011 年 6 月 8 日
Extra details for your question should be included as comments (like this one) or edits to your original question.
Spencer
2011 年 6 月 8 日
0 投票
1 件のコメント
Sean de Wolski
2011 年 6 月 8 日
MATLAB works in double precision so it shouldn't have issues at 1e4. Unless you're dividing a very large number by 1e4.
Even:
2e200/1e4
doesn't go to inf.
カテゴリ
ヘルプ センター および File Exchange で Surface and Mesh Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!