Warning: Function behaves unexpectedly on array inputs. To improve performance, properly vectorize your function to return an output with the same size and shape as the input arguments.
古いコメントを表示
Hello,
I want to visualize a cost function of a localization problem. However if i use fimplicit3 the following warning appears: "Warning: Function behaves unexpectedly on array inputs. To improve performance, properly vectorize your function to return an output with the same size and shape as the input arguments" and the plot is empty. Here is my code:
syms x y z
Jd=(-(((x - 10)^2 + (y - 8)^2 + (z - 1/10)^2)^(1/2)/343 - ((x - 9)^2 + (z - 1/10)^2 + y^2)^(1/2)/343 + 166153461756515/288230376151711744)*((1227133513142857*((y - 3)^2 + (z - 1)^2 + x^2)^(1/2))/841813590016 + (8589934592000001*((x - 9)^2 + (z - 1/10)^2 + y^2)^(1/2))/5892695130112 + (500000*((x - 5)^2 + (y - 10)^2 + (z - 3/2)^2)^(1/2))/343 - (1500000*((x - 10)^2 + (y - 8)^2 + (z - 1/10)^2)^(1/2))/343 + 47361719490181303919776257030055/4951760157141521099596496896) - (((y - 3)^2 + (z - 1)^2 + x^2)^(1/2)/343 - ((x - 9)^2 + (z - 1/10)^2 + y^2)^(1/2)/343 + 3755404798969945/288230376151711744)*((500000*((x - 9)^2 + (z - 1/10)^2 + y^2)^(1/2))/343 - (1500000*((y - 3)^2 + (z - 1)^2 + x^2)^(1/2))/343 + (8589934592000001*((x - 5)^2 + (y - 10)^2 + (z - 3/2)^2)^(1/2))/5892695130112 + (1227133513142857*((x - 10)^2 + (y - 8)^2 + (z - 1/10)^2)^(1/2))/841813590016 - 75964017393466287210169242730447/4951760157141521099596496896) - (((x - 5)^2 + (y - 10)^2 + (z - 3/2)^2)^(1/2)/343 - ((x - 9)^2 + (z - 1/10)^2 + y^2)^(1/2)/343 + 564171350756517/72057594037927936)*((8589934592000001*((y - 3)^2 + (z - 1)^2 + x^2)^(1/2))/5892695130112 + (1227133513142857*((x - 9)^2 + (z - 1/10)^2 + y^2)^(1/2))/841813590016 - (1500000*((x - 5)^2 + (y - 10)^2 + (z - 3/2)^2)^(1/2))/343 + (500000*((x - 10)^2 + (y - 8)^2 + (z - 1/10)^2)^(1/2))/343 - 4.9414e+03));
fs=@(x,y,z)double(Jd);
fimplicit3(fs,[-30 30 -30 30 -30 30]);
Due to the fact that the cost function is calculated out of a localization problem it's so huge.
採用された回答
その他の回答 (1 件)
madhan ravi
2020 年 7 月 13 日
fs = matlabFunction(Jd)
4 件のコメント
Max Lacher
2020 年 7 月 13 日
Max Lacher
2020 年 7 月 13 日
Walter Roberson
2020 年 7 月 13 日
fimplicit3 takes a long time to compute the faces
Max Lacher
2020 年 7 月 13 日
カテゴリ
ヘルプ センター および 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!