Raising a scalar to each element in a matrix
3 ビュー (過去 30 日間)
古いコメントを表示
I have tried to raise e to the power of each element of a matrix for a contour plot of e^(1/X)/Y and got the error message for non-finite ZData. I was wondering whether the operation has done a form of matrix multiplication and added multiple elements results instead of outputting e^(ij) for element ij.
Thanks
x = linspace(0,50);
y = linspace(0,50);
[X,Y] = meshgrid(x,y);
Z = expm(X.^(-1))*(Y.^(-1));
contour(X,Y,Z);
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!