Matrix is singular to working precision. Meshgrid
1 回表示 (過去 30 日間)
古いコメントを表示
[x,y] = meshgrid(0.1:0.01:1,0.1:0.01:1);
z = ((1-x)*(cos(2*pi*y+(pi + atan((cos(2*pi*y)-1)/(2*pi*(1-y)+sin(2*pi*y)))))-...
cos(pi + atan((cos(2*pi*y)-1)/(2*pi*(1-y)+sin(2*pi*y))))))/((1-y)*(cos(2*pi*x...
+(pi + atan((cos(2*pi*x)-1)/(2*pi*(1-x)+sin(2*pi*x)))))-cos(pi + atan((cos(2*pi*x)-1)/(2*pi*(1-x)+sin(2*pi*x))))));
0 件のコメント
採用された回答
Rik
2021 年 3 月 18 日
編集済み: Rik
2021 年 3 月 18 日
You aren't using elementwise operations anywhere. You should replace every * by .* and every / by ./, that way you will not be doing matrix operations.
[x,y] = meshgrid(0.1:0.01:1,0.1:0.01:1);
z = ((1-x).*(cos(2*pi*y+(pi + atan((cos(2*pi*y)-1)./(2*pi*(1-y)+sin(2*pi*y)))))-...
cos(pi + atan((cos(2*pi*y)-1)./(2*pi*(1-y)+sin(2*pi*y))))))./((1-y).*(cos(2*pi*x...
+(pi + atan((cos(2*pi*x)-1)./(2*pi*(1-x)+sin(2*pi*x)))))-cos(pi + atan((cos(2*pi*x)-1)./(2*pi*(1-x)+sin(2*pi*x))))));
surf(x,y,z),view(45,30)
その他の回答 (0 件)
参考
カテゴリ
Help Center および 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!