フィルターのクリア

How to plot a simple expression in matlab

1 回表示 (過去 30 日間)
lakom Mariem
lakom Mariem 2017 年 11 月 14 日
コメント済み: Rik 2017 年 11 月 14 日
Hello everyone Please I need your help..I'm new in matlab and i have problem in plotting curves..... I have a curve already plotted and i have to reproduce it.I have this data : the function is y=1/(2^(K-1)) (K var) The x axis is [0:5:50] The y axis is [10^(-5):10^(-1):10^(0)] the figure is below.I have to plot the curve for "OW" (blue sky) Anyone please can help me and thanks in advance.
  5 件のコメント
Rik
Rik 2017 年 11 月 14 日
編集済み: Rik 2017 年 11 月 14 日
The best help I can give you is to tell you to do a tutorial before you try some random code you found. That last link I gave you also contains helpful advice (like e.g. to select you code and hit the {}Code button to correctly format code).
You should not use plot inside a loop if you want to plot a single line.
Rik
Rik 2017 年 11 月 14 日
I don't know what your goal is with sending me the e-mail you did. You're the one asking for help. You've been working with Matlab for at least 8 months now, so you had time enough to learn the tool you are using. The code below should be trivial to come up with if you have done any tutorial worth its salt.
K=1:4;
y= 1./(2.^(K-1));
semilogy(K,y,'--')
ytickvals=10.^(-5:1:0);
yticks(ytickvals)
ylim([min(ytickvals) max(ytickvals)])
grid on
If you want any help from someone, I would suggest not hitting send on an e-mail that contains a sentence like "Me too i can advise you to learn english so you can write a simple sentence correctly."

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by