Curl function outputting -inf and NaN
Ältere Kommentare anzeigen
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 Kommentar
Robert
am 16 Nov. 2023
Try curlX=curl(Y.',Z.',V.',W.');
Akzeptierte Antwort
Weitere Antworten (3)
Sean de Wolski
am 8 Jun. 2011
0 Stimmen
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
am 8 Jun. 2011
0 Stimmen
1 Kommentar
Andrew Newell
am 8 Jun. 2011
Extra details for your question should be included as comments (like this one) or edits to your original question.
Spencer
am 8 Jun. 2011
0 Stimmen
1 Kommentar
Sean de Wolski
am 8 Jun. 2011
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.
Kategorien
Mehr zu Surface and Mesh Plots finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!