How to plot the exponentional function in matlab
조회 수: 4 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (2개)
Image Analyst
2017년 10월 21일
You need to use the plot() function.
댓글 수: 3
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.
lakom Mariem
2017년 10월 23일
댓글 수: 6
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?
참고 항목
카테고리
Help Center 및 File Exchange에서 Polar Plots에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!