필터 지우기
필터 지우기

Plotting Sound Pressure Level

조회 수: 2 (최근 30일)
Articat
Articat 2018년 11월 26일
댓글: Image Analyst 2019년 1월 10일
Hi,
So I am trying to plot the eqution:
The final solution should look like what is attached. I constructed it using a loop but I don't think I'm follwoing the right steps.. For some reason it just says R is equal to 1000 and does not give me values between 1 to 1000.
r = 45;
alpha = .005;
W = .01;
Wref = 1*10^-12;
Lw = 10*log(W/Wref)
for R = 1:1000
Lp(R) = Lw-10*log10(2*pi*r^2)-alpha*R;
end
help.JPG
Thanks, anything would help.
  댓글 수: 2
Articat
Articat 2018년 11월 26일
little r is the radius of the turbine.
madhan ravi
madhan ravi 2018년 11월 26일
are you sure the formula is right?

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2018년 11월 26일
편집: Image Analyst 2018년 11월 26일
Instead of
for R = 1:1000
Lp(R) = Lw-10*log10(2*pi*r^2)-alpha*R;
end
do it vectorized
alpha = .005;
W = .01;
Wref = 1*10^-12;
Lw = 10*log(W/Wref)
R = 1 : 1000
Lp = Lw - 10*log10(2*pi*R.^2) - alpha*R;
plot(R, Lp, 'b-', 'LineWidth', 2)
grid on;
xlabel('R', 'FontSize', 15);
ylabel('Lw', 'FontSize', 15);
This assumes your formula for Lw is correct.
0000 Screenshot.png
  댓글 수: 2
Articat
Articat 2019년 1월 9일
Thank you!
Image Analyst
Image Analyst 2019년 1월 10일
Are we done yet? What's still needed for you to "Accept this answer"?

댓글을 달려면 로그인하십시오.

카테고리

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