How to plot the exponentional function in matlab

7 ビュー (過去 30 日間)
lakom Mariem
lakom Mariem 2017 年 10 月 21 日
コメント済み: lakom Mariem 2017 年 10 月 25 日
Hello everyone
I want to plot this expression of probability in matlab y=exp(-(K-1)) in function of P[dB]. How can I do it? Please i need help.
I tried with this code but it doesn't go.
function y = Swb(K,p)
K=4;
y= exp(-(K-1));
end

回答 (2 件)

Image Analyst
Image Analyst 2017 年 10 月 21 日
You need to use the plot() function.
  3 件のコメント
Image Analyst
Image Analyst 2017 年 10 月 21 日
Where does he say he wants the PSD? If he did, then yes, he'd use pwelch(). But I see him saying "I want to plot this expression...." and for that you'd use plot(). Of course his expression is just a single number since y = exp(-(K-1)) = exp(-(4-1)) = exp(-3) = 0.04978706.
I think he needs to read this link
Birdman
Birdman 2017 年 10 月 21 日
I think you miss this part :
...in function of P[dB].

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


lakom Mariem
lakom Mariem 2017 年 10 月 23 日
Thanks all me,I want to reproduce this figure.For every single curve ,there is its own expression of probability.For example, for "SW" the expression of probability is Psw = exp(-(K-1)).Please can anyone help me how can i do it if you please and thanks in advance.
  6 件のコメント
Image Analyst
Image Analyst 2017 年 10 月 25 日
If K is just a single number, like 4, then exp(-(K-1)) is just exp(-3), which is just 0.0497870683678639, not a whole curve. What would you have as the x coordinate?
lakom Mariem
lakom Mariem 2017 年 10 月 25 日
Ok I understand.thanks a lot

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

カテゴリ

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