필터 지우기
필터 지우기

Finding the roots across a range of values

조회 수: 4 (최근 30일)
Tony Stianchie
Tony Stianchie 2023년 3월 7일
답변: VBBV 2023년 3월 7일
I'd like to find the roots of b for the array b(i,1) and store those values in BI(i)
H = 0.1;
I = 200;
Y = 0;
b = transpose(1:I);
for i = 1:I
b(i) = fzero(@(b)(b(i)*tan(b(i))-H),b(i));
BI(i) = b(i) ;
end

답변 (1개)

VBBV
VBBV 2023년 3월 7일
H = 0.1;
I = 200;
Y = 0;
b = transpose(1:I);
for i = 1:I
b(i) = fzero(@(b)(b*tan(b)-H),b(i));
BI(i) = b(i) ;
end

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by