I'm trying to plot this equation, but I'm not able to write the code. How do I assign the values to the variables, and how do I write this equation on the plot in Latex form?

 採用された回答

Image Analyst
Image Analyst 2020 年 12 月 24 日
編集済み: Image Analyst 2020 年 12 月 24 日

0 投票

For example
d = 10
dPrime = 30
alpha = 45
G = (-20/T) * (log10(dPrime/d) + alpha * (dPrime - d) * log10(exp(1))
but that's a single number unless something is a vector? I assume G is the y axis. What do you want along the x axis? d? like
d = linspace(0, 5, 1000);
??? What values should the other variables have?
Use text() to write the equation in Latex form on the graph. See the text() documentation for the confusing details.

2 件のコメント

kmlshblr
kmlshblr 2020 年 12 月 24 日
thanks for the answer, can you tell how do i get the graph for G. sorry if i sound dumb its been many months since i used matlab so i don't remember many things
Image Analyst
Image Analyst 2020 年 12 月 24 日
Use plot()
plot(x, G, 'b-', 'LineWidth', 2);
grid on;
xlabel('x', 'FontSize', 20);
ylabel('G', 'FontSize', 20);
but you forgot to answer my questions. Not a single one of the 3 questions. Why not? Did you not want my help anymore?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMathematics についてさらに検索

製品

リリース

R2018a

タグ

質問済み:

2020 年 12 月 24 日

コメント済み:

2020 年 12 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by