how to find derivative of a function and ploting the surface of function and its derivative
7 ビュー (過去 30 日間)
古いコメントを表示
I want to plot surface of a function and its derivative but I dont understand the code kindly help me
0 件のコメント
回答 (2 件)
ANKUR KUMAR
2021 年 3 月 1 日
In order to plot a surface, you can use the below commands:
[X,Y] = meshgrid(1:0.5:10,1:20);
Z = sin(X) + cos(Y);
surf(X,Y,Z)
You can use the differentiation fucntion (https://www.mathworks.com/help/symbolic/differentiation.html) to differentiate, and can use the above code to plot the surface plot.
0 件のコメント
Image Analyst
2021 年 3 月 1 日
If you have a 2-D array of numbers, you can use surf() to plot a 3-D rendering of it, or imshow() to display it as an image. If you then want the gradient of the function, you can use imgradient() to get the magnitude of the derivative, or imgradientxy() to get gradients in each direction, then use surf() or imshow().
Attach your function if you need more help.
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!