필터 지우기
필터 지우기

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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by