how do i plot a graph in xy-plane?

4 ビュー (過去 30 日間)
Hiral
Hiral 2014 年 11 月 5 日
編集済み: MA 2014 年 11 月 5 日
how do i plot a graph in xy-plane for y = h / x, where h = 6.25 * 10^(-34)? how should i do?

回答 (3 件)

Chad Greene
Chad Greene 2014 年 11 月 5 日
The answer should become evident when you understand the answer to your other question.

Mikhail
Mikhail 2014 年 11 月 5 日
編集済み: Mikhail 2014 年 11 月 5 日
First, you should define everything:
h = 6.25 * 10^(-34);
x=1:100;
y=h.*x;
Plot(x,y)
So here you first define your h, then points in which you will plot your function (here x=1,2,3,...,100), but if, say, you want to plot your function from -5 to 5 with step 0.1, you write x=-5:0.1:5, so in this case x=-5,-4.9,-4.8,...,4.9,5.
After that you calculate your y points according to your formula and plot it.

MA
MA 2014 年 11 月 5 日
編集済み: MA 2014 年 11 月 5 日
h=6.25*10^(-34);
x=-10:10;
y=h*x;
plot(x,y)
grid on

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by