필터 지우기
필터 지우기

M.file implementing the formula below using either Mat-lab or octave

조회 수: 2 (최근 30일)
In the following, R can take any value between 5 and 6. Work out the value of I for R = 5.00, 5.01, 5.02, ..., and 6. Then find the average value of I. I= 30/(R*(sqrt(R^2+15*pi^2))

채택된 답변

Stalin Samuel
Stalin Samuel 2015년 2월 20일
r = 5.00:0.01:6.00
for i=1:numel(r)
R=r(i)
I(i)= 30/(R*(sqrt(R^2+15*pi^2)))
end
avg =mean(I)
  댓글 수: 2
Titus Edelhofer
Titus Edelhofer 2015년 2월 20일
Hi Samuel,
there is no need to use a loop, if you replace "30/" by "30./" and the "*" and "^2" by ".*" and ".^2" ...
Titus

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Octave에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by