Plotting a function which has two dependent variables and shows it with colour intensity
2 ビュー (過去 30 日間)
古いコメントを表示
I apologize if someone asked similiar question before, but I tried to search it always comes out with two independent variables.
I would like to make a plot of the function like this, where y is a function of x, z is a function of x,y
x=[0,pi/2]
y=x^2+sinx
z=f(x,y)= ln(x+20)*y/(x+2y)
x=linspace(0,pi/2,50);
y=x.^2+sin(x);
z=(ln(x+20).*y)./(x+2*y);
and i tried to code the function directly, and I would like to plot it in 2D by showing x-y graph while the z is shown in color intensity (or 3D and I can rotate it)
I struggle it so much as I couldn't get more information from the website, as the most of them, the x,y variables are independent.
Trillion of Thanks in advance!!! Thank you!
回答 (1 件)
Deepak Gupta
2020 年 4 月 23 日
編集済み: Deepak Gupta
2020 年 4 月 23 日
Hi Wei,
Try plot3 or surf function to plot.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Line Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!